This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With Ruby 1.9.2: can't convert Rspec::Mocks::Mock to String (Rspec::Mocks::Mock#to_str gives Rspec::Mocks::Mock) | |
WidgetsController PUT update with valid params assigns the requested widget as @widget | |
Failure/Error: put :update, :id => "1" | |
can't convert Rspec::Mocks::Mock to String (Rspec::Mocks::Mock#to_str gives Rspec::Mocks::Mock) | |
# /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/actionpack/lib/action_controller/metal/redirecting.rb:79:in `===' | |
# /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/actionpack/lib/action_controller/metal/redirecting.rb:79:in `_compute_redirect_to_location' | |
# /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/actionpack/lib/action_controller/metal/redirecting.rb:59:in `redirect_to' | |
# /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/actionpack/lib/action_controller/metal/flash.rb:25:in `redirect_to' | |
# /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/actionpack/lib/a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rake spec | |
(in /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails) | |
/Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/activerecord/lib/active_record/fixtures.rb:816: undefined method `setup' for :Class (NoMethodError) | |
from /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/activesupport/lib/active_support/concern.rb:17:in `class_eval' | |
from /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/activesupport/lib/active_support/concern.rb:17:in `append_features' | |
from /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/lib/rspec/rails/example/fixture_example_group.rb:9:in `include' | |
from /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/lib/rspec/rails/example/fixture_example_group.rb:9 | |
from /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/activesupport/lib/active_support/concern.rb:17:in `class_eval' | |
from /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/rails/activesupport/lib/active_support/concern.rb:17:in `appen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bundle | |
Gemfile -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/Gemfile | |
Gemfile.lock -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/Gemfile.lock | |
README -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/README | |
Rakefile -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/Rakefile | |
app -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/app | |
autotest -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/autotest | |
config -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/config | |
config.ru -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/config.ru | |
db -> /Users/dchelimsky/projects/ruby/rspec2/repos/rspec-rails/tmp/example_app/db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
def profile | |
render :text => profile_url("foo") | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem "arel", :path => "../../vendor/arel" | |
gem "rails", :path => "../../vendor/rails" | |
gem 'sqlite3-ruby', :require => 'sqlite3' | |
# Use unicorn as the web server | |
# gem 'unicorn' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionView | |
module TemplateMuter | |
extend ActiveSupport::Concern | |
def find_all(*args) | |
templates = super(*args) | |
templates.each { |t| t.source = "OMG Empty Source" } | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gemfile | |
source 'http://rubygems.org' | |
gem 'acts_as_list', '0.1.2' | |
gem 'acts_as_singleton', :git => 'git://github.com/stephencelis/acts_as_singleton.git' | |
gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3' | |
gem 'aws-s3', '0.6.2' | |
gem 'cancan', '1.1.1' | |
gem 'delayed_job', '2.0.3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ be rspec spec | |
No examples were matched by {:focus=>true}, running all | |
............................................................................................................................**.................FFF.......*.....................................................*.FFFF............................................FF.FF....FFF..FFFFF....................................................... | |
1) RSpec::Core::ExampleGroup #metadata adds the the file_path to metadata | |
Failure/Error: Unable to find matching line from backtrace | |
expected: "/Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/example_group_spec.rb", | |
got: "/Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/example_group_spec.rb:190" (using ==) | |
# ./spec/rspec/core/example_group_spec.rb:190 | |
# ./spec/spec_helper.rb:73 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "run a variety of specs against the generated app" | |
task :smoke do | |
Dir.chdir("./tmp/example_app/") do | |
Bundler.with_clean_env do | |
sh "rake rails:template LOCATION='../../templates/run_specs.rb'" | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RSpec | |
module Rails | |
class Railtie < ::Rails::Railtie | |
config.generators.integration_tool :rspec | |
config.generators.test_framework :rspec | |
rake_tasks do | |
load "rspec/rails/tasks/rspec.rake" | |
end | |
end |