Sha256: 06929118885dca0f5b1cdba0d96dda5d55c8f47e1809c9e172c5d0775c1c5115

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

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
  include WaitFor
  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
    JsTestServer::Configuration.instance.spec_path = spec_path
    JsTestServer::Configuration.instance.root_path = root_path
    JsTestServer::Configuration.instance.framework_path = framework_path
  end

  after(:each) do
    JsTestServer::Server::Resources::RemoteControl.queue = nil
  end

  def app
    Sinatra::Application
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
honkster-js-test-server-0.2.10 spec/spec_helpers/example_group.rb
honkster-js-test-server-0.2.9 spec/spec_helpers/example_group.rb
js-test-server-0.2.8 spec/spec_helpers/example_group.rb
js-test-server-0.2.7 spec/spec_helpers/example_group.rb
js-test-server-0.2.6 spec/spec_helpers/example_group.rb
js-test-server-0.2.1 spec/spec_helpers/example_group.rb
js-test-server-0.2.0 spec/spec_helpers/example_group.rb