what do these error messages mean? - ruby-on-rails

i'm in section 9 of the hartl rails tutorial, this def isn't making sense. thoughts?
1) User pages index
Failure/Error: visit users_path
ActionView::Template::Error:
wrong number of arguments (2 for 1)
# ./app/helpers/users_helper.rb:3:in `gravatar_for'
# ./app/views/users/index.html.erb:7:in `block in _app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./app/views/users/index.html.erb:5:in `each'
# ./app/views/users/index.html.erb:5:in `_app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./spec/requests/user_pages_spec.rb:12:in `block (3 levels) in <top (required)>'
2) User pages index should list each user
Failure/Error: visit users_path
ActionView::Template::Error:
wrong number of arguments (2 for 1)
# ./app/helpers/users_helper.rb:3:in `gravatar_for'
# ./app/views/users/index.html.erb:7:in `block in _app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./app/views/users/index.html.erb:5:in `each'
# ./app/views/users/index.html.erb:5:in `_app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./spec/requests/user_pages_spec.rb:12:in `block (3 levels) in <top (required)>'

Chapter 7's first exercise specifies that you extend the gravatar_for method to include a new, optional parameter for including size. You likely didn't do this exercise and so it is only expecting the original 1 argument as opposed to both arguments. Complete the exercise and you should get this code to pass.

In Your user_helper.rb file in helper folder you are passing 2 arguments instead of 1 for gravatar_for method. If you put code of that it would be much easier to solve.

Related

Resolving Active record fixture format error

I am trying to test my application and I continually get the following error:
Error:
ContractsControllerTest#test_should_get_show:
ActiveRecord::Fixture::FormatError: ActiveRecord::Fixture::FormatError
Error:
ContractsControllerTest#test_should_get_show:
NoMethodError: undefined method `each' for nil:NilClass
Below is the code on my contract controller and I have similar code like this on all the controllers.
def index
#contract = Contract.all.paginate(page: params[:page], :per_page => 70)
end
def show
#contract = Contract.find(params[:id])
end
def new
#contract = Contract.new
end
def create
#contract = Contract.new(located)
if #contract.save
flash[:success] = "A record has been successfully added"
redirect_to contracts_path
else
render 'new'
end
end
def located
params.require(:contract).permit(:contract_name, :contract_status, :services_rendered, :contract_value, :award_year)
end
# editing a record in the contract from cotract table
def edit
#contract = Contract.find(params[:id])
end
def update
#contract = Contract.find(params[:id])
if #contract.update_attributes(located)
flash[:success] = "Contract form updated"
redirect_to contracts_path
else
render'edit'
end
end
def destroy
Contract.find(params[:id]).destroy
flash[:success] = "A record has been successfully deleted"
redirect_to contracts_path
end
Below is the full trace of the error when I run the command rails db:fixtures:load --trace
rails aborted!
ActiveRecord::Fixture::FormatError: ActiveRecord::Fixture::FormatError
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixture_set/file.rb:72:in `validate'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixture_set/file.rb:49:in `raw_rows'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixture_set/file.rb:37:in `config_row'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixture_set/file.rb:27:in `model_class'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:791:in `block (2 levels) in
read_fixture_files'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixture_set/file.rb:15:in `open'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:790:in `block in read_fixture_files'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:789:in `each'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:789:in `each_with_object'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:789:in `read_fixture_files'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:598:in `initialize'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:529:in `new'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:529:in `block (2 levels) in
create_fixtures'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:526:in `map'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:526:in `block in create_fixtures'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/connection_adapters/postgresql/referential_integrity.rb: 22:in `disable_referential_integrity'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/fixtures.rb:523:in `create_fixtures'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-
5.0.5/lib/active_record/railties/databases.rake:207:in `block (3 levels) in
<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-
5.0.5/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-
5.0.5/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-
5.0.5/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-
5.0.5/lib/rails/commands.rb:18:in `<top (required)>'
/home/ubuntu/workspace/final_project/bin/rails:9:in `require'
/home/ubuntu/workspace/final_project/bin/rails:9:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-
2.0.2/lib/spring/client/rails.rb:28:in `load'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-
2.0.2/lib/spring/client/rails.rb:28:in `call'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-
2.0.2/lib/spring/client/command.rb:7:in `call'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/client.rb:30:in
`run'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-2.0.2/bin/spring:49:in `<top
(required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-
2.0.2/lib/spring/binstub.rb:31:in `load'
/usr/local/rvm/gems/ruby-2.3.0/gems/spring-
2.0.2/lib/spring/binstub.rb:31:in`<top (required)>'
/home/ubuntu/workspace/final_project/bin/spring:15:in `require'
/home/ubuntu/workspace/final_project/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:fixtures:load
(See full trace by running task with --trace)
My application containts 12 controllers, the same error occurs in each of the controllers. Also, I have 10 tables in my schema some of which contain references / relations to each other.
I don't really know what is wrong and I have be struggling with this problem for about four days now. I would be grateful if anyone could help me with any code or information that could help me to trace the source of the error. I would also be grateful if you could provide information for exactly where I should place the code to trace and solve this error.
Thanks
One of your fixture files in test/fixtures has bad formatting. The problem does not appear to be with your controllers or tests since it is happening for every single one of them. All of the fixtures get loaded into the test database before every single test, even if some are not used for the current test. So if there is an error in one of these files it will get raised for every test.
According to the line from the activerecord source that is throwing the error at the top of the stack trace you've provided, ActiveRecord is expecting every entry in your YAML fixture file to be a key which references a hash.
Each entry in a fixture should represent a model instance. The top level key is used as a name to reference that instance (rails usually names them one and two when generating the fixture template for a new model). Here is an example YAML fixture with one good entry and a few different types of bad ones.
# This will produce a hash associated to key :hash_entry.
# This is the correct type of entry, all others that follow are incorrect for rails fixtures.
hash_entry:
key1: value1
key2: value2
# This will produce the string "not a hash" associated to key :string_entry
string_entry: not a hash
# This will produce the array ["also", "not","a","hash"] associated to key :array_entry
array_entry:
- also
- not
- a
- hash
# This will produce nil associated to key :nil_entry
nil_entry:
You need to examine your fixtures files in test/fixtures and look for any that have the bad formatting as described above. Here is a rake task that will help you identify which files and entries need to be corrected. First run rails g task fixtures check_format, and place this code inside of the rake file that gets generated at lib/tasks/fixtures.rake.
namespace :fixtures do
desc "Looks for bad fixture files"
task check_format: :environment do
fixtures_dir = Rails.root.join("test", "fixtures")
fixture_files = Pathname.glob("#{fixtures_dir}/**/*.yml")
fixture_files.each do |file|
fixture = YAML.load(IO.read(file))
fixture.each_pair do |name, entry|
puts "Bad fixture entry #{name}: #{entry.inspect} in fixture #{file}" unless entry.is_a? Hash
end
end
end
end
Then run rails fixtures:check_format and the offending files and entries will be printed out on the command line for you to find and correct.

Remove Factory Girl from backtrace

I'm trying to clean up the backtraces I get in my Rails application. Here is the one I'm working on right now:
Failure/Error: attributes_for :bookmark, :invalid
ArgumentError:
Trait not registered: invalid
# /Users/amandacrawford/.rvm/gems/ruby-2.3.1#autocato/gems/factory_girl-4.8.0/lib/factory_girl/registry.rb:24:in `find'
# /Users/amandacrawford/.rvm/gems/ruby-2.3.1#autocato/gems/factory_girl-4.8.0/lib/factory_girl/decorator.rb:10:in `method_missing'
# (... more lines from Factory Girl ...)
# /Users/amandacrawford/.rvm/gems/ruby-2.3.1#autocato/gems/factory_girl-4.8.0/lib/factory_girl/strategy_syntax_method_registrar.rb:20:in `block in define_singular_strategy_method'
# ./spec/controllers/bookmarks_controller_spec.rb:9:in `block (2 levels) in <top (required)>'
# ./spec/controllers/bookmarks_controller_spec.rb:39:in `block (4 levels) in <top (required)>'
I want all but the last two lines removed from the stack trace. So far, this is my config:
# config/initializers/backtrace_silencers.rb
Rails.backtrace_cleaner.add_silencer { |line| line =~ /spring/ }
Rails.backtrace_cleaner.add_silencer { |line| line =~ /factory_girl\/registry/ }
I know that if the application stack trace is empty after the silencers are applied, it will show everything, but in this case, there should still be the last two lines.
I came across the answer to my own question today - when one of my specs had the full backtrace removed, I realized it was RSpec that was cleaning up the backtrace in this case.
RSpec also has a way to remove gems from the backtrace - add the following to your rails_helper.rb:
config.filter_gems_from_backtrace('spring', 'factory_girl')

Poltergeits doesn't working well in rspec tests

I have the following feature tests passing:
require 'rails_helper'
describe "Create a quetsion", type: :feature do
let(:question) { build(:question) }
before do
login_as create(:user, :teacher)
exercise = create(:exercise)
visit new_exercise_question_url(exercise.id)
end
context "whit valid attributes" do
subject do
fill_in "question_score", with: question.score
fill_in "question_description", with: question.description
click_on "Criar"
end
it "create the question" do
expect{ subject }.to change(Question, :count).by(1)
expect(page).to have_current_path(question_path(Question.first.id))
end
end
context "whit invalid attributes" do
subject do
click_on "Criar"
end
it "doesn't create the exercise" do
expect{ subject }.to change(Question, :count).by(0)
expect(page).to have_selector("div.alert.alert-danger")
end
end
end
That works fine, unless I add js: true. In this case, I have the following errors:
1) Create a quetsion whit valid attributes create the question
Failure/Error: fill_in "question_score", with: question.score
Capybara::ElementNotFound:
Unable to find field "question_score"
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/node/finders.rb:44:in `block in find'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/node/base.rb:85:in `synchronize'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/node/finders.rb:33:in `find'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/node/actions.rb:85:in `fill_in'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/session.rb:735:in `block (2 levels) in <class:Session>'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
# ./spec/features/create_a_question_spec.rb:14:in `block (3 levels) in <top (required)>'
# ./spec/features/create_a_question_spec.rb:20:in `block (4 levels) in <top (required)>'
# ./spec/features/create_a_question_spec.rb:20:in `block (3 levels) in <top (required)>'
2) Create a quetsion whit invalid attributes doesn't create the exercise
Got 0 failures and 2 other errors:
2.1) Failure/Error: visit new_exercise_question_url(exercise.id)
Capybara::Poltergeist::StatusFailError:
Request to 'http://www.example.com/exercises/1/questions/new' failed to reach server, check DNS and/or server status
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/browser.rb:376:in `command'
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/browser.rb:35:in `visit'
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/session.rb:240:in `visit'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
# ./spec/features/create_a_question_spec.rb:8:in `block (2 levels) in <top (required)>'
2.2) Failure/Error: #socket.send(command.id, command.message, receive_timeout) or raise DeadClient.new(command.message)
Capybara::Poltergeist::DeadClient:
PhantomJS client died while processing {"id":"2928bf26-2dd8-45d7-8822-41b2923fd40d","name":"reset","args":[]}
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/server.rb:38:in `send'
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/browser.rb:369:in `command'
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/browser.rb:224:in `reset'
# /usr/local/rvm/gems/ruby-2.3.1/gems/poltergeist-1.13.0/lib/capybara/poltergeist/driver.rb:183:in `reset!'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/session.rb:109:in `reset!'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara.rb:334:in `block in reset_sessions!'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara.rb:334:in `reverse_each'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara.rb:334:in `reset_sessions!'
# /usr/local/rvm/gems/ruby-2.3.1/gems/capybara-2.10.1/lib/capybara/rspec.rb:21:in `block (2 levels) in <top (required)>'
I checked, whit js: true my page html isn't written too (instead the desired HTML, I only receive <html><head></head><body></body></html>).
I added poltergeist gem to test javascritp, and configured it in my rspec rails_helper.rb file:
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
PhantomJS is already instaled and available in my $PATH. I'm completelly out of ideas, what can be happening here?
There are a number of potential issues here.
If you have set Capybara.server = :puma, make sure you're not running puma 3.7.0 which has a bug in it that will be fixed when 3.7.1 is released. For now use 3.6.9
If this is the first time you're setting up js tests make sure you have setup and correctly configured DatabaseCleaner so that you are no running in transaction mode for js: true tests. See https://github.com/teamcapybara/capybara#transactions-and-database-setup and https://github.com/DatabaseCleaner/database_cleaner#rspec-with-capybara-example for the recommended configuration
Once you have #1 and #2 worked out then you'll need to look at your tests and deal with the fact that after a click/click_on type action you need to check for a visible page change to ensure the action has completed before you move on. This is because clicks happen but the actions those clicks trigger can occur asynchronously. In your current example that means you would need something like
...
click_on "Criar"
expect(page).to have_text("Question created!") #whatever message is shown when the action has completed, or check the page etc.
Without something like that the change check will fail because it will check the count before the actual actually occurs.
Default to _path helpers rather than _url helpers when there's no need for a specific host name (99.9% of the time). This lets Capybara fill_in the correct host/port for the server being run. To visit _url helpers there are a number of configuration parameters that need to be carefully set.
Note: It's generally not best practice to be checking database counts in feature tests, they should generally be limited to checking on visible page changes.

Rspec: How to test that substring appears in string a certain amount of times?

Trying to use the .exactly method but it doesn't seem to work here.
expect(data).to include(purchase.email).exactly(3).times
This produces the error:
NoMethodError:
undefined method `exactly' for #<RSpec::Matchers::BuiltIn::Include:0x007f85c7e71108>
# ./spec/models/csv_generator_spec.rb:34:in `block (4 levels) in <top (required)>'
# ./spec/models/csv_generator_spec.rb:18:in `each'
# ./spec/models/csv_generator_spec.rb:18:in `block (3 levels) in <top (required)>'
Does anyone know how I would test that a substring appears a certain amount of times in a string?
You can use the scan method, which returns an array of matches. Then you just check the size of the array:
expect(data.scan(purchase.email).size).to eq(3)
An alternative is this syntax:
expect(data.scan(purchase.email)).to have(3).items
expect(data.scan(purchase.email)).to have_exactly(3).items
You could also do this using the repeated regex pattern like this,
r = %r{(#{purchase.email}).*\1.*\1.*}
Then, expect use regexp matcher in rspec as,
match = data.match(r)
expect(data).to match(r)
expect(match[1]).to be_eql(purchase.email)

RSpec and Autotest issue in rails 3 project

Im using autotest-notification v2.3.4 and rspec v2.0.1 for writing tests in my rails v3.2.3 project on my machine running Ubuntu 12.04.In my pages_controller_spec.rb i have the following code
require 'spec_helper'
describe PagesController do
describe "GET 'contact'" do
it "should be successful" do
get 'contact'
response.should be_success
end
end
end
When i run the command rspec spec/ im getting the following error
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\
e methods directly in RSpec::Rails::SetupAndTeardownAdapter instead. (called from <top (required)> at /home/kris/development/rails_projects/s\
ample_app/spec/controllers/pages_controller_spec.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\
e methods directly in RSpec::Rails::TestUnitAssertionAdapter instead. (called from <top (required)> at /home/kris/development/rails_projects/\
sample_app/spec/controllers/pages_controller_spec.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\
e methods directly in RSpec::Rails::ViewRendering instead. (called from <top (required)> at /home/kris/development/rails_projects/sample_app/\
spec/controllers/pages_controller_spec.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instanc\
e methods directly in RSpec::Rails::ControllerExampleGroup instead. (called from <top (required)> at /home/kris/development/rails_projects/sa\
mple_app/spec/controllers/pages_controller_spec.rb:3)
Failures:
1) PagesController GET 'contact' should be successful
Failure/Error: Unable to find matching line from backtrace
undefined method `run_all' for []:Array
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/hooks.rb:116:in `run_hook_filtered'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:174:in `eval_before_alls'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:229:in `run'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block (2 levels) in run'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `map'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block in run'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/reporter.rb:11:in `report'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:23:in `run'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:55:in `run_in_process'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:46:in `run'
# /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:10:in `block in autorun'
Finished in 0.00028 seconds
1 example, 1 failure
/home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/hooks.rb:116:in `run_hook_filtered': undefined method `run_all' for\
[]:Array (NoMethodError)
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:213:in `eval_after_alls'
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/example_group.rb:236:in `run'
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block (2 levels) in run'
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `map'
from /home/kris/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:26:in `block in run'
What is causing this error and how can i fix it ?
Please Help
Thank You.
Try updating RSpec. This: ruby-forum.com/topic/788351 (and the linked github issue) suggests there is an issue with older versions of RSpec, and Ruby 1.9.3.

Resources