Sha256: d825e4761e8eb934f14424bd39a560be351cd0a3dac4a6942f7cc460afae30cd

Contents?: true

Size: 821 Bytes

Versions: 27

Compression:

Stored size: 821 Bytes

Contents

require 'simplecov'
SimpleCov.start

require 'webmock/rspec'
require 'json_expressions/rspec'
require 'capybara/rspec'
require 'dugway'

RSpec.configure do |config|
  config.add_setting :fixture_path
  config.fixture_path = File.join(Dir.pwd, 'spec', 'fixtures')
  
  config.before(:each) do
    # Stub api calls
    stub_request(:get, /.*api\.bigcartel\.com.*/).to_return(lambda { |request|
      { :body => File.new(File.join(RSpec.configuration.fixture_path, 'store', request.uri.path.split('/', 3).last)), :status => 200, :headers => {} }
    })

    # Stub source directory
    Dugway.stub(:source_dir) { 
      File.join(RSpec.configuration.fixture_path, 'theme')
    }

    # Stub theme
    Dugway.stub(:theme) { 
      Dugway::Theme.new
    }

    # Setup Capybara
    Capybara.app = Dugway.application
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
dugway-0.10.5 spec/spec_helper.rb
dugway-0.10.4 spec/spec_helper.rb
dugway-0.10.3 spec/spec_helper.rb
dugway-0.10.2 spec/spec_helper.rb
dugway-0.10.1 spec/spec_helper.rb
dugway-0.10.0 spec/spec_helper.rb
dugway-0.9.0 spec/spec_helper.rb
dugway-0.8.4 spec/spec_helper.rb
dugway-0.8.3 spec/spec_helper.rb
dugway-0.8.2 spec/spec_helper.rb
dugway-0.8.1 spec/spec_helper.rb
dugway-0.8.0 spec/spec_helper.rb
dugway-0.7.1 spec/spec_helper.rb
dugway-0.7.0 spec/spec_helper.rb
dugway-0.6.7 spec/spec_helper.rb
dugway-0.6.6 spec/spec_helper.rb
dugway-0.6.5 spec/spec_helper.rb
dugway-0.6.4 spec/spec_helper.rb
dugway-0.6.3 spec/spec_helper.rb
dugway-0.6.2 spec/spec_helper.rb