Tag Archives: test

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

Run the generator again with the –webrat flag if you want to use webrat matchers – how?

suppose you want a file views/resumes/index.html.erb_spec.rb want to have webrat matchers 1) delete the file “index.html.erb_spec.rb” 2) use the generator respec:view resumes index –webrat or  respec:view resumes index show    –webrat     etc  if required more files or generator … Continue reading

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

Cucumber- IndexError-element size differs (2 should be 3)

cause by missing the column marker(pipe symbol) in Scenarios: Error code …. ….. Scenarios: no matches | code | guess | mark | | 1234 | 5555 | Scenarios: 1 number correct | code | guess | mark | | … Continue reading

Posted in rails, ROR, ruby on rails | 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