Sha256: 09fbe41fe6be8b7c9244d24926656c08eb73a41431d46ef1541d3e7db236f7c6
Contents?: true
Size: 823 Bytes
Versions: 6
Compression:
Stored size: 823 Bytes
Contents
require 'spec_helper' describe Mutant::Loader::Eval, '.run' do subject { object.run(node, file, line) } let(:object) { described_class } let(:file) { 'test.rb' } let(:line) { 1 } let(:source) do # This test case will blow up when not executed # under toplevel binding. <<-RUBY class SomeNamespace class Bar def some_method end end class SomeOther class Foo < Bar end end end RUBY end let(:node) do source.to_ast end it 'should load nodes into vm' do subject ::SomeNamespace::SomeOther::Foo end it 'should set file and line correctly' do subject ::SomeNamespace::Bar.instance_method(:some_method).source_location.should eql(['test.rb', 3]) end end
Version data entries
6 entries across 6 versions & 1 rubygems