Sha256: 882d06e00a058863c2cd094d179ff4747c7de25ec0f3af586b61329cb21d895b

Contents?: true

Size: 666 Bytes

Versions: 4

Compression:

Stored size: 666 Bytes

Contents

require 'webmock/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
    }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dugway-0.5.3 spec/spec_helper.rb
dugway-0.5.2 spec/spec_helper.rb
dugway-0.5.1 spec/spec_helper.rb
dugway-0.5.0 spec/spec_helper.rb