Sha256: 53441734b48d6b873b5f05c2cc2028fc8dd88335962538e585ef9516966e727c

Contents?: true

Size: 764 Bytes

Versions: 2

Compression:

Stored size: 764 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'smashing_docs'

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end
  config.before(:each) do
    SmashingDocs.config do |c|
      c.template_file = 'gem_rspec/fake_template.md.erb'
      c.output_file   = 'gem_rspec/fake_output.md'
    end
  end
  config.after(:each) do
    SmashingDocs.finish!
  end
end

# Include some fake structs that act like response/request objects.
Request  = Struct.new :method, :params, :path
Response = Struct.new :body, :success?

def request
  Request.new("GET", {id: 12}, 'api/users')
end

def response
  Response.new('{"id": 12, "name": "rick"}', true)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smashing_docs-1.0.0 gem_rspec/spec_helper.rb
smashing_docs-0.1.0 gem_rspec/spec_helper.rb