Sha256: a9edb69fd244caacdc5e30aa4d226b647980a9b56036bbe31aad82e9191116e0

Contents?: true

Size: 505 Bytes

Versions: 51

Compression:

Stored size: 505 Bytes

Contents

class Fixnum
  def greater_than?(other)
    self > other
  end

  def greater_than_or_equal_to?(other)
    self >= other
  end
end

module TestHelpers
  def app
    Brief.testcase.server
  end

  def json
    @json ||= JSON.parse(last_response.body)
  end

  def env_for(*args)
    Rack::MockRequest.send(:env_for, *args)
  end

  def route_for(*args)
    env = env_for(*args)
    Brief::Server::Route.new(env, Brief.testcase)
  end

  def handler_for(*args)
    route_for(*args).send(:handler)
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
brief-1.17.14 spec/support/test_helpers.rb
brief-1.17.13 spec/support/test_helpers.rb
brief-1.17.12 spec/support/test_helpers.rb
brief-1.17.11 spec/support/test_helpers.rb
brief-1.17.10 spec/support/test_helpers.rb
brief-1.17.9 spec/support/test_helpers.rb
brief-1.17.8 spec/support/test_helpers.rb
brief-1.17.7 spec/support/test_helpers.rb
brief-1.17.5 spec/support/test_helpers.rb
brief-1.17.4 spec/support/test_helpers.rb
brief-1.17.3 spec/support/test_helpers.rb
brief-1.17.2 spec/support/test_helpers.rb
brief-1.17.1 spec/support/test_helpers.rb
brief-1.17.0 spec/support/test_helpers.rb
brief-1.16.2 spec/support/test_helpers.rb
brief-1.16.1 spec/support/test_helpers.rb
brief-1.16.0 spec/support/test_helpers.rb
brief-1.15.5 spec/support/test_helpers.rb
brief-1.15.4 spec/support/test_helpers.rb
brief-1.15.3 spec/support/test_helpers.rb