Sha256: 4a10265374e1dee6cf0b138a7e3a82b8321deaa6a8fcd3f661fbadf7c01d9c8e

Contents?: true

Size: 258 Bytes

Versions: 4

Compression:

Stored size: 258 Bytes

Contents

RSpec::Matchers.define :be_a_json do |expected_type|
  match do |json|
    json.is_a? expected_type
  end

  description do
    "be a JSON #{expected_type}"
  end

  failure_message_for_should do |json|
    %Q(should #{description}, but is #{json})
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-api-0.2.0 lib/rspec-api/matchers/body.rb
rspec-api-0.1.2 lib/rspec-api/matchers/body.rb
rspec-api-0.1.1 lib/rspec-api/matchers/body.rb
rspec-api-0.1.0 lib/rspec-api/matchers/body.rb