Remove legacy guards for non rbx environment in specs
This commit is contained in:
parent
9755009966
commit
e238890f2c
3 changed files with 232 additions and 238 deletions
|
@ -1,13 +1,12 @@
|
|||
require 'spec_helper'
|
||||
|
||||
if "".respond_to?(:to_ast)
|
||||
class CodeLoadingSubject
|
||||
class CodeLoadingSubject
|
||||
def x
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe Mutant, 'code loading' do
|
||||
describe Mutant, 'code loading' do
|
||||
let(:context) { Mutant::Context::Constant.build(CodeLoadingSubject) }
|
||||
let(:node) { 'def foo; :bar; end'.to_ast }
|
||||
let(:root) { context.root(node) }
|
||||
|
@ -19,5 +18,4 @@ if "".respond_to?(:to_ast)
|
|||
it 'should add the method to subject' do
|
||||
CodeLoadingSubject.new.foo.should be(:bar)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
if "".respond_to?(:to_ast)
|
||||
describe Mutant, 'method matching' do
|
||||
describe Mutant, 'method matching' do
|
||||
after do
|
||||
if defined?(::Foo)
|
||||
Object.send(:remove_const, 'Foo')
|
||||
|
@ -250,5 +249,4 @@ if "".respond_to?(:to_ast)
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
if "".respond_to?(:to_ast)
|
||||
describe Mutant::Context::Constant, '#root' do
|
||||
describe Mutant::Context::Constant, '#root' do
|
||||
subject { object.root(node) }
|
||||
|
||||
let(:object) { described_class.build(SampleSubjects::ExampleModule) }
|
||||
|
@ -20,5 +19,4 @@ if "".respond_to?(:to_ast)
|
|||
it 'should place the ast under scope' do
|
||||
scope_body.should be(node)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue