Sha256: 784da65c9be38e6134665a2455bf37248a00f71dc3c28e18c39f89d8151c89b8

Contents?: true

Size: 722 Bytes

Versions: 12

Compression:

Stored size: 722 Bytes

Contents

require 'spec_helper'

describe Mutant::Loader::Rubinius, '.run' do
  before do
    pending
  end

  subject { object.run(node) }

  let(:object) { described_class }

  after do
    Object.send(:remove_const, :SomeNamespace)
  end

  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
    Rubinius::AST::Script.new(source.to_ast).tap do |source|
      source.file = "/some/source"
    end
  end

  it 'should load nodes into vm' do
    subject
    SomeNamespace::SomeOther::Foo
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mutant-0.2.12 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.11 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.9 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.8 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.7 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.6 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.5 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.4 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.3 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.2 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.1 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
mutant-0.2.0 spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb