Skip to content

Commit

Permalink
updates tests dependencies for spree 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alepore committed Sep 30, 2013
1 parent 18c3c3c commit f41a2a7
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 41 deletions.
27 changes: 8 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,12 @@ GEM
cancan (1.6.10)
canonical-rails (0.0.3)
rails (>= 3.1, < 5.0)
capybara (1.1.4)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
xpath (~> 2.0)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.2)
Expand All @@ -105,10 +102,9 @@ GEM
diff-lcs (1.2.4)
erubis (2.7.0)
execjs (2.0.2)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
ffaker (1.19.0)
ffi (1.9.0)
highline (1.6.18)
hike (1.2.3)
httparty (0.11.0)
Expand Down Expand Up @@ -188,7 +184,6 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rubyzip (0.9.9)
sass (3.2.11)
sass-rails (3.2.6)
railties (~> 3.2.0)
Expand All @@ -197,11 +192,6 @@ GEM
select2-rails (3.4.9)
sass-rails
thor (~> 0.14)
selenium-webdriver (2.35.1)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (< 1.0.0)
websocket (~> 1.0.4)
spree (2.0.5)
spree_api (= 2.0.5)
spree_backend (= 2.0.5)
Expand Down Expand Up @@ -275,19 +265,18 @@ GEM
railties (>= 3.0)
warden (1.2.3)
rack (>= 1.0)
websocket (1.0.7)
xpath (0.1.4)
xpath (2.0.0)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
capybara (~> 1.1.2)
capybara (~> 2.1)
coffee-rails
factory_girl (~> 2.6.4)
factory_girl (~> 4.2.0)
ffaker
rspec-rails (~> 2.9)
rspec-rails (~> 2.14.0)
sass-rails
spree (~> 2.0)
spree_auth_devise!
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require 'bundler'
Bundler::GemHelper.install_tasks

require 'rspec/core/rake_task'
require 'spree/core/testing_support/common_rake'
require 'spree/testing_support/common_rake'

RSpec::Core::RakeTask.new

Expand Down
14 changes: 7 additions & 7 deletions spec/lib/spree_shipworks/orders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ module SpreeShipworks
describe Orders do
context '#since' do
let(:date) { DateTime.now }
let(:order_scope) { mock('order_scope') }
let(:where_date_scope) { mock('where_date_scope') }
let(:where_state_scope) { mock('where_state_scope') }
let(:order_scope) { double('order_scope') }
let(:where_date_scope) { double('where_date_scope') }
let(:where_state_scope) { double('where_state_scope') }

before(:each) do
Spree::Order.should_receive(:where).
Expand Down Expand Up @@ -60,16 +60,16 @@ module SpreeShipworks
context 'with valid arguments' do
def order(date_time)
parsed_date_time = DateTime.parse(date_time)
result = mock("order created at #{DateTime.now} updated at #{parsed_date_time}")
result = double("order created at #{DateTime.now} updated at #{parsed_date_time}")
result.stub(:updated_at).and_return(parsed_date_time)
result
end

let(:date) { DateTime.parse(date_string) }
let(:maxcount) { maxcount_string.to_i }
let(:relation_scope) { mock('relation_scope') }
let(:limit_scope) { mock('limit_scope') }
let(:offset_scope) { mock('offset_scope') }
let(:relation_scope) { double('relation_scope') }
let(:limit_scope) { double('limit_scope') }
let(:offset_scope) { double('offset_scope') }
let(:orders) {[
order(date.to_s),
order(date.to_s),
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/get_count_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
let(:action_params) { { 'start' => '2012-01-01T11:59:00' } }
let(:date_string) { action_params['start'] }
let(:date) { DateTime.parse(date_string) }
let(:order_scope) { mock('order_scope') }
let(:order_scope) { double('order_scope') }

include_context 'for ShipWorks actions'
it_should_behave_like "a ShipWorks API action"
Expand Down
6 changes: 3 additions & 3 deletions spec/requests/update_shipment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{ 'order' => '1', 'tracking' => '1' }
}
let(:find_scope) {
mock('find_scope')
double('find_scope')
}
let(:shipments_scope) {
mock('shipments_scope')
double('shipments_scope')
}
let(:shipment_scope) {
mock('shipment_scope')
double('shipment_scope')
}

include_context 'for ShipWorks actions'
Expand Down
4 changes: 2 additions & 2 deletions spec/requests/update_status_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
{ 'order' => '1', 'status' => 'next' }
}
let(:order_scope) {
mock('order_scope')
double('order_scope')
}
let(:shipment_scope) {
mock('shipment_scope')
double('shipment_scope')
}
let(:shipments_scope) {
[shipment_scope]
Expand Down
10 changes: 5 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }

# Requires factories defined in spree_core
require 'spree/core/testing_support/factories'
require 'spree/core/testing_support/controller_requests'
require 'spree/core/testing_support/authorization_helpers'
require 'spree/core/url_helpers'
require 'spree/testing_support/factories'
require 'spree/testing_support/controller_requests'
require 'spree/testing_support/authorization_helpers'
require 'spree/testing_support/url_helpers'

RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
Expand All @@ -25,7 +25,7 @@
#
# visit spree.admin_path
# current_path.should eql(spree.products_path)
config.include Spree::Core::UrlHelpers
config.include Spree::TestingSupport::UrlHelpers

# == Mock Framework
#
Expand Down
6 changes: 3 additions & 3 deletions spree_shipworks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Gem::Specification.new do |s|
s.add_dependency 'spree_core', '~> 2.0'
s.add_dependency 'nokogiri', '~> 1.5.9'

s.add_development_dependency 'capybara', '~> 1.1.2'
s.add_development_dependency 'capybara', '~> 2.1'
s.add_development_dependency 'coffee-rails'
s.add_development_dependency 'factory_girl', '~> 2.6.4'
s.add_development_dependency 'factory_girl', '~> 4.2.0'
s.add_development_dependency 'ffaker'
s.add_development_dependency 'rspec-rails', '~> 2.9'
s.add_development_dependency 'rspec-rails', '~> 2.14.0'
s.add_development_dependency 'sass-rails'
s.add_development_dependency 'sqlite3'
end

0 comments on commit f41a2a7

Please sign in to comment.