Sha256: 75d17d15def07036d2d10951107b2399a9b9231ad831b684015d597af3209184
Contents?: true
Size: 489 Bytes
Versions: 3
Compression:
Stored size: 489 Bytes
Contents
module AcceptanceHelpers def json @json ||= if respond_to?(:response_body) JSON.parse(response_body, symbolize_names: true) else JSON.parse(response.body, symbolize_names: true) end end def sign_in_as(app) token = create(:auth_token, authenticable: app) header 'Authorization', "Token token=#{token.token}" end end RSpec.configure do |config| config.include Acceptance::JsonHelpers, type: :acceptance end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kratos-1.0.2 | templates/acceptance_helpers_rspec.rb |
kratos-1.0.1 | templates/acceptance_helpers_rspec.rb |
kratos-1.0.0 | templates/acceptance_helpers_rspec.rb |