Sha256: cdd7a3dae6b1b364fa4716824479c08c3deac614fd57f750bb19d98d606e40f5

Contents?: true

Size: 990 Bytes

Versions: 4

Compression:

Stored size: 990 Bytes

Contents

class Spec::ExampleGroup
  class << self
    def macro(name, &block)
      eigen do
        define_method(name, &block)
      end
    end

    def eigen(&block)
      eigen_class = (class << self; self; end)
      eigen_class.class_eval(&block)
      eigen_class
    end
  end
  
  include Rack::Test::Methods
  include BeHttp
  attr_reader :framework_path, :spec_path, :root_path, :server, :connection
  before(:all) do
    dir = File.dirname(__FILE__)
    @framework_path = File.expand_path("#{LIBRARY_ROOT_DIR}/spec/example_framework")
    @spec_path = File.expand_path("#{LIBRARY_ROOT_DIR}/spec/example_spec")
    @root_path = File.expand_path("#{LIBRARY_ROOT_DIR}/spec/example_root")
    stub(Thread).start.yields
  end

  before(:each) do
    JsTestCore::Configuration.instance.spec_path = spec_path
    JsTestCore::Configuration.instance.root_path = root_path
    JsTestCore::Configuration.instance.framework_path = framework_path
  end

  def app
    Sinatra::Application
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
honkster-screw-unit-server-0.6.3 vendor/js-test-core/spec/spec_helpers/example_group.rb
honkster-screw-unit-server-0.6.2 vendor/js-test-core/spec/spec_helpers/example_group.rb
honkster-screw-unit-server-0.6.1 vendor/js-test-core/spec/spec_helpers/example_group.rb
btakita-screw-unit-server-0.6.0 vendor/js-test-core/spec/spec_helpers/example_group.rb