spec/unit/mutant/expression/methods_spec.rb in mutant-0.5.26 vs spec/unit/mutant/expression/methods_spec.rb in mutant-0.6.0
- old
+ new
@@ -1,11 +1,9 @@
-require 'spec_helper'
+RSpec.describe Mutant::Expression::Methods do
-describe Mutant::Expression::Methods do
-
let(:object) { described_class.parse(input) }
- let(:cache) { Mutant::Cache.new }
+ let(:env) { Fixtures::TEST_ENV }
let(:instance_methods) { 'TestApp::Literal#' }
let(:singleton_methods) { 'TestApp::Literal.' }
describe '#match_length' do
let(:input) { instance_methods }
@@ -24,20 +22,20 @@
it { should be(0) }
end
end
describe '#matcher' do
- subject { object.matcher(cache) }
+ subject { object.matcher(env) }
context 'with an instance method' do
let(:input) { instance_methods }
- it { should eql(Mutant::Matcher::Methods::Instance.new(cache, TestApp::Literal)) }
+ it { should eql(Mutant::Matcher::Methods::Instance.new(env, TestApp::Literal)) }
end
context 'with a singleton method' do
let(:input) { singleton_methods }
- it { should eql(Mutant::Matcher::Methods::Singleton.new(cache, TestApp::Literal)) }
+ it { should eql(Mutant::Matcher::Methods::Singleton.new(env, TestApp::Literal)) }
end
end
end