Tag Archives: RSpec

RSpec – doubles stub and mock

doubles when we depend on components with nondeterministic characteristics, we may find that files get corrupted, disk fail, networks time out, and servers go down in the middle of running specs. because these are things that we have no control … Continue reading

Posted in rails, ROR, ruby on rails, testing, web development | Tagged , , , , , | Leave a comment

Webrat – how to use

1)gem install ‘webrat’ 2)in Gemfile add group :test do gem ‘webrat’ end 3)in spec_helper.rb  add Webrat.configure do |config| config.mode = :rails end ref 1) http://www.arailsdemo.com/posts/37 2) https://getsatisfaction.com/railstutorial/topics/rspec_undefined_method_has_selector http://www.klairvoyant.in

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment

RSpec With Rails 3.1.2

1) Install the gems: $ gem install rspec $ gem install webrat $ gem install rspec-rails 2) add these to gem file and bundle install group :development, :test do gem ‘rspec-rails’ end 3)run the following in the project directory rails … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , | Leave a comment

RSpec 2 on Rails 3

What is BDD (Behaviour driven development) We can say BDD is TDD (Test driven development)  Done Right. It extends TDD by writing test cases in a natural language that non-programmers can read. Behavior-driven developers use their native language in combination … Continue reading

Posted in rails, ROR, ruby on rails | Tagged , | Leave a comment

rake aborted! uninitialized constant Rake::DSL

Problem: rake aborted! uninitialized constant Rake::DSL solution In Rakefile above require ‘rake’ put  require ‘rake/dsl_definition’ or simple add require ‘rake/dsl_definition’ in the rake file source http://www.klairvoyant.in

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | 2 Comments