Sha256: 172bfecc4ff7bae962beca8e954247733d1c691975d7074407f97c51b425bc74

Contents?: true

Size: 542 Bytes

Versions: 15

Compression:

Stored size: 542 Bytes

Contents

# frozen_string_literal: true

module Grumlin::Test::RSpec
  module GremlinContext
  end

  ::RSpec.shared_context GremlinContext do
    include GremlinContext
    include Grumlin::Expressions

    [:__, :g].each do |name|
      define_method(name) do |cuts = Grumlin::Shortcuts::Storage.empty|
        cuts.send(name)
      end
    end

    before do
      Grumlin::Expressions.constants.each do |tool|
        stub_const(tool.to_s, Grumlin::Expressions.const_get(tool))
      end
    end

    after do
      Grumlin.close
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
grumlin-1.2.0 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.1.0 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.4 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.3 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.3.beta1 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.2 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.1 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc7 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc6 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc5 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc4 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc3 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc2 lib/grumlin/test/rspec/gremlin_context.rb
grumlin-1.0.0.rc1 lib/grumlin/test/rspec/gremlin_context.rb