Top "Rspec2" questions

RSpec 2 is a version of the Behaviour-Driven Development tool for Ruby programmers.

How do I prepare test database(s) for Rails rspec tests without running rake spec?

After significant troubleshooting, I figured out that I needed to run rake spec once (I can abort with control-c) before …

ruby-on-rails ruby-on-rails-3 rspec rspec2 specjour
Rails 3.1, RSpec: testing model validations

I have started my journey with TDD in Rails and have run into a small issue regarding tests for model …

ruby-on-rails ruby-on-rails-3 rspec rspec2 rspec-rails
Setup RSpec to test a gem (not Rails)

It is pretty easy with the added generator of rspec-rails to setup RSpec for testing a Rails application. But how …

testing rubygems rspec gem rspec2
How can I tell Rails to use RSpec instead of test-unit when creating a new Rails app?

I have test-unit installed and rspec installed (along with -core, -expectations, -mocks and -rails version 2.6.x). When I run the …

ruby-on-rails-3 rspec rspec2 testunit
Rspec: how can I check if a call to a method of another class is called?

I can I check if FeedItem::populate_from_friend_to_user is called inside the user class? it "should auto …

ruby-on-rails rspec2
How to test class methods in RSPEC

I wrote a simple class method Buy.get_days(string), and is trying to test it with different text string …

ruby testing rspec rspec2
POSTing raw JSON data with Rails 3.2.11 and RSpec

In order to ensure that my application is not vulnerable to this exploit, I am trying to create a controller …

ruby-on-rails json ruby-on-rails-3.2 rspec2 rspec-rails
RSpec: Stub private method

I try to test a class with RSpec2, that has some private methods, which are called from some public methods. …

ruby-on-rails ruby ruby-on-rails-3 rspec rspec2
How to test with RSpec if an email is delivered

I'd like to test if an email is delivered if I call a controller method with :post. I'll use email_…

ruby-on-rails-3 rspec2
How to test ApplicationController method defined also as a helper method?

In my ApplicationController I have a method defined as a helper method: helper_method :some_method_here How do I …

ruby-on-rails rspec helper rspec2