Displaying 20 results from an estimated 30000 matches similar to: "StackOverflow Question: Need help with my Rspec Request Spec!"
2013 Feb 10
2
What's wrong with my spec? (StackOverflow Question)
Hi all, I just posted a question on SO and it would be great if you guys
could help out.
http://stackoverflow.com/questions/14795829/devise-rspec-user-requires-account-activation-in-requests-spec-even-after-con
Cheers!
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
I''m trying to test that "static" pages (they''re ERB, but get cached),
generated through rails, don''t render any stray flash notices left over by
the authentication system (Devise) or wherever else.
I''ve tried writing this controller spec, but it appears that response.body
only renders the template, not its layouts?
describe "so that static
2011 Aug 09
0
Devise, RSpec and Webrat
My app is builded with rails 2.3.12, rspec-rails 1.3.2, webrat 0.7.3.
My spec_helper.rb
ENV["RAILS_ENV"] ||= ''test''
require
File.expand_path(File.join(File.dirname(__FILE__),''..'',''config'',''environment''))
require ''spec/autorun''
require ''spec/rails''
require
2013 Mar 20
2
Rspec + Devise + BaseController
Hello there,
I''m creating a base controller for the admin section of a project. All
controllers whitin the admin section will inherit from it.
#####################################################
#app/controllers/admins/base_controller.rb
class Admins::BaseController < ApplicationController
layout "admin_cms"
before_filter :authenticate_admin!
end
2012 Feb 04
0
ActiveRecord Associations not working in RSpec with Devise
Hi everyone,
I have the following classes:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :timeoutable,
:recoverable, :rememberable, :trackable, :validatable
has_many :comments, :dependent => destroy
...
end
class Comment < ActiveRecord::Base
belongs_to :user
belongs_to :commentable, :polymorphic => true
...
end
In rails console,
2013 Mar 28
0
Can not determine issue in my factories with factory girl in rspec
Hi Folks,
I hope you''re doing good. Sorry for a long email. I am just trying my best
to learn something new and, need your help to understand/ sort a small
issue which I am not able to figure out.
I have create couple of factories and created some examples for rspec for
one of my projects. I have got everything working on my local. Even, my
specs are green on local for both ruby
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep
getting the error:
Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied
I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my
spec_helper.rb and test.rb files down to the bare minimum, still getting
the error above.
2011 Feb 06
2
Controller Testing + Devise = boom (undefined @controller, request)
Here I am, trying to learn TDD and BDD. Getting start, most simple
case, and the world is falling apart:
My test code:
it "should respond with success" do
puts ''hi''
# get :new
# response.should be_success
end
My stack trace:
$ rspec spec
"controller: nil"
F
Failures:
1) VideosController new exposes request and response before and
2012 May 05
1
rspec-mocks and rspec-rails-2.10.1 are released!
These are patch releases recommended for anybody who has already
upgraded to 2.10.
### rspec-mocks-2.10.1
full changelog: http://github.com/rspec/rspec-mocks/compare/v2.10.0...v2.10.1
Bug fixes
* fix [regression of edge case
behavior](https://github.com/rspec/rspec-mocks/issues/132)
* fixed failure of
`object.should_receive(:message).at_least(0).times.and_return value`
* fixed failure
2011 Aug 10
1
How to stop Rspec loading my Cucumber fixtures
I have a bunch of fixtures designed to populate the database for my Cucumber
integration tests.
But at this stage I want my database to be empty when using Rspec.
So, I moved the fixtures from `/spec/fixtures` to
`features/support/fixtures`, and updated `features/support/env.rb` to read:
Fixtures.reset_cache
fixtures_folder = File.join(RAILS_ROOT, ''features'',
2012 Jun 14
1
Cucumber/RSpec ::: Capybara? Webrat What am I using??
Hey everybody
I''m currently reading through the Pragmatic Programmers RSpec book, and
I really enjoy it.
But I’m facing some problems because of the fact that the book is
already some years old, I guess. I have installed rvm and use Ruby
1.9.3, and I didn’t really get some Rails code examples to work
properly, so I tried it with a 1.8.7 installation, but there I had some
other problems
2010 Jun 20
7
rspec-rails 2.0.0.beta.12 showing undefined method error for route_to
First of all, I''ve been trying to find an answer for this problem all
over the internet without luck.
The thing is that I am using RVM with ruby 1.9.2-head and I created a
new empty gemset. Then I installed bundler gem with:
gem bundler install
That installed the library into the /Users/damselem/.rvm/gems/
ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
2010 Oct 20
3
rspec error's when checking LayoutLinks from the railstutorials
I am following the rails tutorial:
http://railstutorial.org/chapters/filling-in-the-layout#top
Basically the test is something like:
spec/requests/layout_links_spec.rb
require ''spec_helper''
describe "LayoutLinks" do
it "should have a Home page at ''/''" do
get ''/''
response.should
2011 Apr 30
1
[rspec-rails] Is it bad form to use spec/requests/*_spec.rb for integration tests?
So I wanted to cook up a quick integration test for something, and I''m
using rspec. I personally just don''t like Cucumber - just a personal
preference, not a slam to the test framework at all - and wanted to
stick to just pure rspec. So I dumped a quick spec file in spec/
reqests and ran it, and of course everything works.
But is this considered bad form, or a less-than-good
2013 Jul 04
3
Rspec devise, testing extended RegistrationController action destroy
Hi everyone,
I have devise 1.5.4 working with rails 3.0.20 and ruby 1.8.7 .
I have extended the destroy action from the RegistrationController, to soft
delete users instead of really deleting them from the database.
def destroy
# raise resouce.inspect # this is just to see if the test hits the
action
resource.soft_delete
set_flash_message :notice, :destroyed
sign_out resource
2010 Oct 12
0
Rails 3 and rspec 2 turning off transactional fixtures per test
I am having trouble turning off transactional fixtures per test in
Rails 3 with rspec 2. I did this successfully with rspec 1.3.1 and
rails 2.
rspec version is 2.0.0.rc
Below is my stack overflow question which provides more details:
http://stackoverflow.com/questions/3907815/rails-3-and-rspec-2-turn-off-transactional-fixtures-for-individual-tests
Any help is appreciated. Thanks!
2011 Dec 05
1
How to extend common helper methods to view specs?
Hi, there,
I have some methods which I have written as helpers.
They are in spec/support/controller_macros.rb (yes, I will change the
name soon).
The 2 methods, login_user and login_admin_user works in the
controller specs BUT fail to work in the view specs when I call them
in the view specs.
---------- spec/spec_helper.rb start --------------------------
# This file is copied to spec/
2007 Jun 05
0
Fwd: testing - test/spec and rspec
are you guys aware of this??
:)
Begin forwarded message:
> From: topfunky <topfunkycorporation at gmail.com>
> Date: June 4, 2007 8:35:24 PM EDT
> To: PeepCode <peepcode at googlegroups.com>
> Subject: Re: testing - test/spec and rspec
> Reply-To: peepcode at googlegroups.com
>
>
> On 5/28/07, Neil <neilrahilly at gmail.com> wrote:
>> Just
2008 May 20
2
rspec fails at first run -- no such file to load -- spec/rails
Hi,
I newly downloaded rspec, rspec_on_rails and ran the command
ruby script/generate rspec
from the instructions http://rspec.info/documentation/rails/install.html
I then created the directories in spec:
controllers, fixtures, helpers, models, views
I then created the file spec/models/user_spec.rb as a spec for my model User.
(Is the convention to name the model''s spec
2009 Sep 09
3
[Rspec] Using Mocha results in uninitialized constant, using a 'fix' breaks RSpec output
After installation of Mocha (0.9.7), running "script/spec spec"
results in a "`const_missing'': uninitialized constant
Test::Unit::TestResult::TestResultFailureSupport (NameError)" error.
(As shown here; http://codepad.org/mTqztjwt )
I''m running Ruby 1.8.6 with Rails 2.3.4 on Windows, rspec (-rails)
1.2.8 (1.2.7.1), Test::Unit 2.0.3
As suggested roughly on