add rspec

This commit is contained in:
Andrew Spinks
2012-03-31 16:38:16 +11:00
parent e93c1decde
commit 511dfa23af
4 changed files with 56 additions and 1 deletions

1
.rspec Normal file
View File

@@ -0,0 +1 @@
--colour

View File

@@ -45,5 +45,8 @@ gem 'jquery-rails'
group :test do
# Pretty printed test output
gem 'turn', '~> 0.8.3', :require => false
gem 'rspec-rails'
gem 'shoulda-matchers'
gem 'machinist'
end

View File

@@ -1,6 +1,6 @@
GIT
remote: git://github.com/spree/spree_i18n.git
revision: 1aef1d10a65027db7c28119da38213ba3dab9a03
revision: 757d0ee7b76a74f86fb9f8474b8fdd7d17fb946e
specs:
spree_i18n (1.0.0)
spree_core (>= 0.30.0)
@@ -72,6 +72,7 @@ GEM
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
@@ -92,6 +93,7 @@ GEM
activesupport (>= 3.0.0)
railties (>= 3.0.0)
kgio (2.7.4)
machinist (2.0)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -148,6 +150,19 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.9.0)
sass (3.1.15)
sass-rails (3.1.6)
actionpack (~> 3.1.0)
@@ -162,6 +177,7 @@ GEM
nokogiri (>= 1.4.0)
nori (~> 1.1)
wasabi (~> 2.1)
shoulda-matchers (1.0.0)
spree (1.0.2)
spree_api (= 1.0.2)
spree_auth (= 1.0.2)
@@ -236,9 +252,12 @@ PLATFORMS
DEPENDENCIES
coffee-rails (~> 3.1.1)
jquery-rails
machinist
pg
rails (= 3.1.4)
rspec-rails
sass-rails (~> 3.1.5)
shoulda-matchers
spree
spree_i18n!
spree_skrill

32
spec/spec_helper.rb Normal file
View File

@@ -0,0 +1,32 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config|
# ## Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
#
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
# If true, the base class of anonymous controllers will be inferred
# automatically. This will be the default behavior in future versions of
# rspec-rails.
config.infer_base_class_for_anonymous_controllers = false
end