Skip to content

Commit

Permalink
Runnable specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdabbs committed Mar 10, 2014
1 parent ce0def9 commit b2c7887
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
6 changes: 4 additions & 2 deletions Gemfile
Expand Up @@ -39,13 +39,15 @@ group :legacy do
end

group :development do
gem 'activerecord-import'
gem 'colorize'
gem 'letter_opener'
gem 'pry'
end

gem 'rspec-rails', group: [:development, :test]
group :development, :test do
gem 'rspec-rails', '~> 3.0.0.beta1'
end

group :test do
gem 'factory_girl_rails'
gem 'simplecov'
Expand Down
26 changes: 17 additions & 9 deletions Gemfile.lock
Expand Up @@ -143,18 +143,26 @@ GEM
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
riddle (1.5.10)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
rspec-rails (2.14.1)
rspec-collection_matchers (0.0.3)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.0.0.beta2)
rspec-support (= 3.0.0.beta2)
rspec-expectations (3.0.0.beta2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (= 3.0.0.beta2)
rspec-mocks (3.0.0.beta2)
rspec-support (= 3.0.0.beta2)
rspec-rails (3.0.0.beta2)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-collection_matchers
rspec-core (= 3.0.0.beta2)
rspec-expectations (= 3.0.0.beta2)
rspec-mocks (= 3.0.0.beta2)
rspec-support (= 3.0.0.beta2)
rspec-support (3.0.0.beta2)
sass (3.3.0)
rake
sass-rails (4.0.1)
Expand Down Expand Up @@ -245,7 +253,7 @@ DEPENDENCIES
rails (~> 4.1.0.beta1)
redcarpet
resque
rspec-rails
rspec-rails (~> 3.0.0.beta1)
sass-rails
simplecov
slim-rails
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/spaces_spec.rb
Expand Up @@ -5,7 +5,7 @@
it "works! (now write some real specs)" do
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
get spaces_path
response.status.should be(200)
expect(response.status).to be(200)
end

pending "write request specs"
Expand Down
10 changes: 4 additions & 6 deletions spec/spec_helper.rb
@@ -1,7 +1,6 @@
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.
Expand All @@ -18,17 +17,17 @@
!!formula.verify(space)
end

failure_message_for_should do |space|
failure_message do |space|
"#{space.name} should satisfy #{formula}"
end

failure_message_for_should_not do |space|
failure_message_when_negated do |space|
"#{space.name} should not satisfy #{formula}"
end
end

Space.define_method :<< do |atom|
traits.create! property: atom.property, value: atom.value, description: 'Test'
Space.send :define_method, :<< do |atom|
traits.create! property: atom.property, value: atom.value, description: 'Test'
end

module Helpers
Expand Down Expand Up @@ -61,7 +60,6 @@ def spaces *syms
config.order = "random"

# Allow focusing on specs
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run focus: true
config.run_all_when_everything_filtered = true

Expand Down

0 comments on commit b2c7887

Please sign in to comment.