Sha256: ae6621aff50fd9609b5397d608cec9988eaf3edb094319eb018b30102fdf78a8

Contents?: true

Size: 539 Bytes

Versions: 6

Compression:

Stored size: 539 Bytes

Contents

require 'spec_helper'

describe Mutant::Loader::Eval, '.run' do

  subject { object.run(node) }

  let(:object) { described_class }

  let(:source) do
    # This test case will blow up when not executed
    # under toplevel binding.
    <<-RUBY
      class SomeNamespace
        class Bar
        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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mutant-0.2.5 spec/unit/mutant/loader/eval/class_methods/run_spec.rb
mutant-0.2.4 spec/unit/mutant/loader/eval/class_methods/run_spec.rb
mutant-0.2.3 spec/unit/mutant/loader/eval/class_methods/run_spec.rb
mutant-0.2.2 spec/unit/mutant/loader/eval/class_methods/run_spec.rb
mutant-0.2.1 spec/unit/mutant/loader/eval/class_methods/run_spec.rb
mutant-0.2.0 spec/unit/mutant/loader/eval/class_methods/run_spec.rb