diff --git a/mutant-rspec.gemspec b/mutant-rspec.gemspec index 76b742e9..30d89d85 100644 --- a/mutant-rspec.gemspec +++ b/mutant-rspec.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |gem| gem.extra_rdoc_files = %w[TODO LICENSE] gem.add_runtime_dependency('mutant', "~> #{gem.version}") - gem.add_runtime_dependency('rspec-core', '>= 2.14.1', '<= 3.0.0.beta2') + gem.add_runtime_dependency('rspec-core', '>= 2.14.1', '<= 3.0.0.rc1') gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5') end diff --git a/spec/integration/mutant/rspec_spec.rb b/spec/integration/mutant/rspec_spec.rb index a08141b6..e16afbe5 100644 --- a/spec/integration/mutant/rspec_spec.rb +++ b/spec/integration/mutant/rspec_spec.rb @@ -48,7 +48,7 @@ describe 'rspec integration' do it_behaves_like 'rspec integration' end - context 'Rspec 3' do + context 'RSpec 3' do let(:gemfile) { 'Gemfile.rspec3' } it_behaves_like 'rspec integration' diff --git a/test_app/Gemfile.rspec3 b/test_app/Gemfile.rspec3 index 7263d4b7..d84a0b50 100644 --- a/test_app/Gemfile.rspec3 +++ b/test_app/Gemfile.rspec3 @@ -1,5 +1,5 @@ source 'https://rubygems.org' -gem 'rspec', '~> 3.0.0.beta2' -gem 'rspec-core', '~> 3.0.0.beta2' +gem 'rspec', '~> 3.0.0.rc1' +gem 'rspec-core', '~> 3.0.0.rc1' gem 'mutant', path: '../' gem 'mutant-rspec', path: '../' diff --git a/test_app/spec/shared/command_method_behavior.rb b/test_app/spec/shared/command_method_behavior.rb deleted file mode 100644 index c62854d4..00000000 --- a/test_app/spec/shared/command_method_behavior.rb +++ /dev/null @@ -1,7 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'a command method' do - it 'returns self' do - should equal(object) - end -end diff --git a/test_app/spec/shared/each_method_behaviour.rb b/test_app/spec/shared/each_method_behaviour.rb deleted file mode 100644 index d9b29d79..00000000 --- a/test_app/spec/shared/each_method_behaviour.rb +++ /dev/null @@ -1,15 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'an #each method' do - it_should_behave_like 'a command method' - - context 'with no block' do - subject { object.each } - - it { should be_instance_of(to_enum.class) } - - it 'yields the expected values' do - subject.to_a.should eql(object.to_a) - end - end -end diff --git a/test_app/spec/shared/hash_method_behavior.rb b/test_app/spec/shared/hash_method_behavior.rb deleted file mode 100644 index 7b20c7d3..00000000 --- a/test_app/spec/shared/hash_method_behavior.rb +++ /dev/null @@ -1,17 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'a hash method' do - it_should_behave_like 'an idempotent method' - - specification = proc do - should be_instance_of(Fixnum) - end - - it 'is a fixnum' do - instance_eval(&specification) - end - - it 'memoizes the hash code' do - subject.should eql(object.memoized(:hash)) - end -end diff --git a/test_app/spec/shared/idempotent_method_behavior.rb b/test_app/spec/shared/idempotent_method_behavior.rb deleted file mode 100644 index 220d792d..00000000 --- a/test_app/spec/shared/idempotent_method_behavior.rb +++ /dev/null @@ -1,7 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'an idempotent method' do - it 'is idempotent' do - should equal(instance_eval(&self.class.subject)) - end -end diff --git a/test_app/spec/shared/invertible_method_behaviour.rb b/test_app/spec/shared/invertible_method_behaviour.rb deleted file mode 100644 index 936d65d0..00000000 --- a/test_app/spec/shared/invertible_method_behaviour.rb +++ /dev/null @@ -1,9 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'an invertible method' do - it_should_behave_like 'an idempotent method' - - it 'is invertible' do - subject.inverse.should equal(object) - end -end diff --git a/test_app/spec/shared/method_filter_parse_behavior.rb b/test_app/spec/shared/method_filter_parse_behavior.rb deleted file mode 100644 index 62268c4d..00000000 --- a/test_app/spec/shared/method_filter_parse_behavior.rb +++ /dev/null @@ -1,18 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'a method filter parse result' do - before do - expected_class.stub(new: response) - end - - let(:response) { double('Response') } - - it { should be(response) } - - it 'should initialize method filter with correct arguments' do - expected_class.should_receive(:new) - .with(TestApp::Literal, :string) - .and_return(response) - subject - end -end diff --git a/test_app/spec/shared/method_match_behavior.rb b/test_app/spec/shared/method_match_behavior.rb deleted file mode 100644 index cf50bf51..00000000 --- a/test_app/spec/shared/method_match_behavior.rb +++ /dev/null @@ -1,40 +0,0 @@ -# encoding: utf-8 - -shared_examples_for 'a method match' do - subject { Mutant::Matcher::Method.parse(pattern).to_a } - - let(:values) { defaults.merge(expectation) } - - let(:method_name) { values.fetch(:method_name) } - let(:method_line) { values.fetch(:method_line) } - let(:method_arity) { values.fetch(:method_arity) } - let(:scope) { values.fetch(:scope) } - let(:node_class) { values.fetch(:node_class) } - let(:node) { mutation_subject.node } - let(:context) { mutation_subject.context } - let(:mutation_subject) { subject.first } - - it 'should return one subject' do - subject.size.should be(1) - end - - it 'should have correct method name' do - name(node).should eql(method_name) - end - - it 'should have correct line number' do - node.line.should eql(method_line) - end - - it 'should have correct arity' do - arguments(node).required.length.should eql(method_arity) - end - - it 'should have correct scope in context' do - context.send(:scope).should eql(scope) - end - - it 'should have the correct node class' do - node.should be_a(node_class) - end -end diff --git a/test_app/spec/unit/test_app/literal/command_spec.rb b/test_app/spec/unit/test_app/literal/command_spec.rb index 8f8a8beb..a5b19249 100644 --- a/test_app/spec/unit/test_app/literal/command_spec.rb +++ b/test_app/spec/unit/test_app/literal/command_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' -describe TestApp::Literal, '#string' do +RSpec.describe TestApp::Literal, '#string' do subject { object.command(double) } let(:object) { described_class.new } - it_should_behave_like 'a command method' + it { should be(object) } end