Skip to content

Commit

Permalink
more work on specs
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamB committed Apr 21, 2011
1 parent 800fdde commit 3ee1c96
Show file tree
Hide file tree
Showing 92 changed files with 111 additions and 92 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -9,8 +9,8 @@ gem 'oauth2', ">= 0.1.1"
# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem "rspec", "~> 2.3.0"
gem 'rspec-rails'
gem "rspec", "~> 2.5.0"
gem 'rspec-rails', "~> 2.5.0"
gem 'ruby-debug19'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem "yard", "~> 0.6.0"
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Expand Up @@ -81,19 +81,19 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
rspec-rails (2.3.1)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.3.0)
rspec (~> 2.5.0)
ruby-debug-base19 (0.11.24)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
Expand Down Expand Up @@ -124,8 +124,8 @@ DEPENDENCIES
oauth (>= 0.4.4)
oauth2 (>= 0.1.1)
rails (>= 3.0.0)
rspec (~> 2.3.0)
rspec-rails
rspec (~> 2.5.0)
rspec-rails (~> 2.5.0)
ruby-debug19
simplecov (>= 0.3.8)
sqlite3-ruby
Expand Down
2 changes: 1 addition & 1 deletion spec/Gemfile
Expand Up @@ -6,7 +6,7 @@ gem "sorcery", '0.3.1', :path => '../../../'
gem 'oauth', ">= 0.4.4"
gem 'oauth2', ">= 0.1.1"
group :development do
gem 'rspec'
gem "rspec", "~> 2.5.0"
gem 'ruby-debug19'
gem 'simplecov', '>= 0.3.8', :require => false # Will install simplecov-html as a dependency
end
16 changes: 8 additions & 8 deletions spec/Gemfile.lock
Expand Up @@ -81,14 +81,14 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
rspec-mocks (2.5.0)
ruby-debug-base19 (0.11.24)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
Expand All @@ -115,7 +115,7 @@ DEPENDENCIES
oauth (>= 0.4.4)
oauth2 (>= 0.1.1)
rails (= 3.0.3)
rspec
rspec (~> 2.5.0)
ruby-debug19
simplecov (>= 0.3.8)
sorcery (= 0.3.1)!
1 change: 1 addition & 0 deletions spec/Rakefile
Expand Up @@ -8,4 +8,5 @@ task :default => :spec
desc "Run all specs for a specific rails version"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = '*_spec.rb'
t.rspec_opts = ["--options #{File.dirname(__FILE__)}/spec.opts"]
end
File renamed without changes.
2 changes: 1 addition & 1 deletion spec/rails3/.rspec
@@ -1 +1 @@
--color
--colour
4 changes: 2 additions & 2 deletions spec/rails3/app_root/Gemfile → spec/rails3/Gemfile
Expand Up @@ -5,8 +5,8 @@ gem 'sqlite3-ruby', :require => 'sqlite3'
gem "sorcery", '0.3.1', :path => '../../../'

group :development, :test do
gem 'rspec'
gem 'rspec-rails'
gem "rspec", "~> 2.5.0"
gem 'rspec-rails', "~> 2.5.0"
gem 'ruby-debug19'
gem 'simplecov', '>= 0.3.8', :require => false # Will install simplecov-html as a dependency
gem 'timecop'
Expand Down
24 changes: 12 additions & 12 deletions spec/rails3/app_root/Gemfile.lock → spec/rails3/Gemfile.lock
@@ -1,6 +1,7 @@
PATH
remote: ../../../
specs:
oauth (0.4.4)
sorcery (0.3.1)
bcrypt-ruby (~> 2.1.4)
json (>= 1.5.1)
Expand Down Expand Up @@ -65,7 +66,6 @@ GEM
mime-types (1.16)
multi_json (0.0.5)
multipart-post (1.1.0)
oauth (0.4.4)
oauth2 (0.4.0)
faraday (~> 0.6.0)
multi_json (~> 0.0.4)
Expand All @@ -89,19 +89,19 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
rspec-rails (2.3.1)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.3.0)
rspec (~> 2.5.0)
ruby-debug-base19 (0.11.24)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
Expand All @@ -127,8 +127,8 @@ PLATFORMS

DEPENDENCIES
rails (= 3.0.3)
rspec
rspec-rails
rspec (~> 2.5.0)
rspec-rails (~> 2.5.0)
ruby-debug19
simplecov (>= 0.3.8)
sorcery (= 0.3.1)!
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions spec/rails3/app_root/Rakefile → spec/rails3/Rakefile
Expand Up @@ -7,4 +7,5 @@ task :default => :spec
desc "Run all specs for a specific rails version"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = '**/*_spec.rb'
t.rspec_opts = ["--options #{File.dirname(__FILE__)}/spec/spec.opts"]
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion spec/rails3/app_root/.rspec

This file was deleted.

27 changes: 0 additions & 27 deletions spec/rails3/app_root/config/database.yml

This file was deleted.

2 changes: 0 additions & 2 deletions spec/rails3/app_root/spec/spec.opts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions spec/rails3/config/database.yml
@@ -0,0 +1,27 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
# development:
# adapter: sqlite3
# database: db/development.sqlite3
# pool: 5
# timeout: 5000
#
# # Warning: The database defined as "test" will be erased and
# # re-generated from your development database when you run "rake".
# # Do not set this db to the same as development or production.
# test:
# adapter: sqlite3
# database: db/test.sqlite3
# pool: 5
# timeout: 5000
#
# production:
# adapter: sqlite3
# database: db/production.sqlite3
# pool: 5
# timeout: 5000

in_memory:
adapter: sqlite3
database: ":memory:"
verbosity: quiet
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions spec/rails3/spec/spec.opts
@@ -0,0 +1,2 @@
--color
--format documentation
File renamed without changes.
@@ -1,7 +1,12 @@
$: << File.join(File.dirname(__FILE__), '..', '..', 'lib' )

# This file is copied to spec/ when you run 'rails generate rspec:install'
# Set the default environment to sqlite3's in_memory database
ENV['RAILS_ENV'] ||= 'in_memory'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'timecop'
# require 'simplecov'
# SimpleCov.root File.join(File.dirname(__FILE__), "..", "..", "app_root" )
# SimpleCov.root File.join(File.dirname(__FILE__), "..", "..", "rails3" )
# SimpleCov.start do
# add_filter "/config/"
#
Expand All @@ -13,20 +18,31 @@
# add_group 'Migrations', 'db/migrate'
# end

require 'timecop'
# Set the default environment to sqlite3's in_memory database
ENV['RAILS_ENV'] ||= 'in_memory'
ENV['RAILS_ROOT'] = 'app_root'
# 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}


# Load the Rails environment and testing framework
require "#{File.dirname(__FILE__)}/../config/environment"
require 'rspec/rails'

RSpec.configure do |config|
config.use_transactional_fixtures = true
config.use_instantiated_fixtures = false
config.include RSpec::Rails::ControllerExampleGroup, :example_group => { :file_path => /controller(.)*_spec.rb$/ }
# == 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
config.mock_with :rspec

# 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

config.before(:suite) do
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate/core")
end
Expand All @@ -51,3 +67,4 @@ class TestMailer < ActionMailer::Base

include ::Sorcery::TestHelpers
include ::Sorcery::TestHelpers::Rails

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion spec/sinatra/Gemfile
Expand Up @@ -5,7 +5,7 @@ gem 'sqlite3-ruby', :require => 'sqlite3'
gem "sorcery", '0.3.1', :path => '../../'

group :development, :test do
gem 'rspec'
gem "rspec", "~> 2.5.0"
gem 'ruby-debug19'
gem 'simplecov', '>= 0.3.8', :require => false # Will install simplecov-html as a dependency
gem 'timecop'
Expand Down
18 changes: 9 additions & 9 deletions spec/sinatra/Gemfile.lock
Expand Up @@ -71,7 +71,7 @@ GEM
multi_json (~> 0.0.4)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
Expand All @@ -89,14 +89,14 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rspec (2.4.0)
rspec-core (~> 2.4.0)
rspec-expectations (~> 2.4.0)
rspec-mocks (~> 2.4.0)
rspec-core (2.4.0)
rspec-expectations (2.4.0)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.4.0)
rspec-mocks (2.5.0)
ruby-debug-base19 (0.11.24)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
Expand Down Expand Up @@ -125,7 +125,7 @@ PLATFORMS
ruby

DEPENDENCIES
rspec
rspec (~> 2.5.0)
ruby-debug19
simplecov (>= 0.3.8)
sinatra (>= 1.2.0)
Expand Down
1 change: 1 addition & 0 deletions spec/sinatra/Rakefile
Expand Up @@ -7,4 +7,5 @@ task :default => :spec
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = '**/*_spec.rb'
t.rspec_opts = ["--options #{File.dirname(__FILE__)}/spec/spec.opts"]
end
4 changes: 2 additions & 2 deletions spec/sinatra/spec/spec.opts
@@ -1,2 +1,2 @@
--colour
--format progress
--color
--format documentation
4 changes: 2 additions & 2 deletions spec/spec.opts
@@ -1,2 +1,2 @@
--colour
--format progress
--color
--format documentation

0 comments on commit 3ee1c96

Please sign in to comment.