i\'ve started writing tests for my controllers. For once of them, i need to be logged in, in order to check whether the page is rendered etc.
I have a form that is suppose to be a POST to CREATE action but it is doing a POST to INDEX action. So i then decided to test my routes with rspec. In my Example i have my test as follows.
I\'m using rspec, cucumber and capybara and I\'m looking for a way to test that a malicious user can\'t hack a form then post to an url he/she doesn\'t have permission to.I have my permissions set up
Here\'s the test: describe \"admin attribute\" do before(:each) do @user = User.create!(@attr) end it \"should respond to admin\" do
This seems like a simple question but I haven\'t found an answer anywhere. I forked this gem on GitHub: https://github.com/kjvarga/sitemap_generator and git cloned the fork to my local machine.
When I run bundle exec rspec spec/ I have one of my tests fail that should be passing. Here\'s the error:
I have a new project that I am trying to get up and running with rspec, autotest and spork. I am using:
In a Rails 3 application us开发者_高级运维ing Steak, Capybara and RSpec how do I test the page\'s title?Since the version 2.1.0 of capybara there are methods on the session to deal with the title.
Is it possible to call should_receive on a non-mock object? If it is, I\'m wondering why this test doesn\'t pass. SiteStyle has_many images and when I call duplicate! on a site_style, I want the imag
I\'m attempting to test that my service is calling Anemone.crawl correctly. I have the following code: