Sha256: 9c90489cf2cdc80d1f319a12d47f1e72b280df25bbfdc85a4f22dbdc0374b07a

Contents?: true

Size: 495 Bytes

Versions: 14

Compression:

Stored size: 495 Bytes

Contents

# -*- encoding : utf-8 -*-

module Decko
  # for use in REST API specs
  module RestSpecMethods
    def with_token_for usermark
      yield Card[usermark].account.reset_token
    end
  end

  # for use in REST API specs
  module RestSpecHelper
    def self.describe_api &block
      RSpec.describe CardController, type: :controller do
        routes { Decko::Engine.routes }
        include Capybara::DSL
        include RestSpecMethods
        instance_eval(&block)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decko-0.8.3 lib/decko/rest_spec_helper.rb
decko-0.8.2 lib/decko/rest_spec_helper.rb
decko-0.8.1 lib/decko/rest_spec_helper.rb
decko-0.8.0 lib/decko/rest_spec_helper.rb
decko-0.7.0 lib/decko/rest_spec_helper.rb
decko-0.7.0.pre lib/decko/rest_spec_helper.rb
decko-0.6.8 lib/decko/rest_spec_helper.rb
decko-0.6.7 lib/decko/rest_spec_helper.rb
decko-0.6.6 lib/decko/rest_spec_helper.rb
decko-0.6.5 lib/decko/rest_spec_helper.rb
decko-0.6.4 lib/decko/rest_spec_helper.rb
decko-0.6.3 lib/decko/rest_spec_helper.rb
decko-0.6.2 lib/decko/rest_spec_helper.rb
decko-0.6.1 lib/decko/rest_spec_helper.rb