Re: [rspec-users] ***SPAM*** RSpec with devise test helpers

2013-10-16 Thread Cynthia Kiser
Is Devise included in your application_controller yet? The line this appears to be complaining about appears to be one that creates the fake Warden instance and tries to merge in the Devise.warden_config https://github.com/plataformatec/devise/blob/master/lib/devise/test_helpers.rb That is assumi

Re: [rspec-users] Template Scaffold syntax error

2013-09-04 Thread Cynthia Kiser
Since the trace isn't pointing to any of your code, it's a bit difficult to track this down. However, the code it is pointing to looks like it is coming from a view: <% module_namespacing do -%> ^ So I would do a search for 'module_namespacing do' within your project. Your IDE may

Re: [rspec-users] help a new rspec user

2012-11-08 Thread Cynthia Kiser
Quoting ishi soichi : > The generated default controller_spec.rb is > > describe "GET index" do > it "assigns all gives as @gives" do > give = Give.create! valid_attributes > get :index, {}, valid_session > assigns(:gives).should eq([give]) > end > end Your test abov

Re: [rspec-users] Drawing the line between controller and integration tests

2012-09-11 Thread Cynthia Kiser
Quoting Fearless Fool : > I'm trying to understand what belongs -- and what doesn't belong -- in > controller tests and in integration tests. > > As a common example, assume I have a list of named widgets. Somewhere > in my code, I want to verify that > > widget = FactoryGirl.create(:widget)

Re: [rspec-users] Simple code dosn't work

2012-04-11 Thread Cynthia Kiser
Quoting Zach Dennis : > On Wed, Apr 11, 2012 at 12:47 PM, Alex Chaffee wrote: > j.even?should be true > > > >>> j.even?.should be true > > > >> j.even?.should be_true > > > > Not to ignite a flame war, but this is my biggest problem with RSpec: Unless > > you're an expert at Ruby syntax alrea

Re: [rspec-users] ***SPAM*** Re: Argument Non-Matchers

2012-04-11 Thread Cynthia Kiser
Quoting Matt Hauck : > Hmm, that's not exactly what I was thinking of... I don't mean that there > should be no arguments at all, but that the arguments should _not_ be of a > certain match. I suspect there isn't a built in matcher to do what you would like. But I suspect you might be about to

Re: [rspec-users] Strange error when running bundle exec rspec spec

2012-04-04 Thread Cynthia Kiser
Quoting Brad Symons : > As I have been going through the chapters, at first the rspec tests were > running completely fine. One of the chapters suggests installing > blueprint stylesheet, which I did. > > Somewhere after that, when I write rspec tests and run bundle exec rspec > spec, it all broke

Re: [rspec-users] Should I use cucumber or Controller RSpecs or both?

2012-02-13 Thread Cynthia Kiser
Quoting Cathal Curtis : > I want to ensure that on receipt of a DELETE request for an instance of > that model, that the application does in fact disallow the deletion and > redirects to an error page. > > Should I create a cucumber test, with a step that would call something > like: "delete url_f

Re: [rspec-users] oddness with messages_path

2011-11-26 Thread Cynthia Kiser
Quoting Justin Ko : > Run "rake routes" and you'll see what the two "paths" generate. Rake routes didn't really give me much insight - but playing around in the console did. Any argument to messages_path gets interpreted as a format - even an integer. > app.messages_path(:pdf) => "/messages.pd

Re: [rspec-users] oddness with messages_path

2011-11-26 Thread Cynthia Kiser
Quoting Patrick J. Collins : > > I can work around it by constructing the url myself with > > "/messages/#{message.id}" but I am curious where the period is coming > > from in the constructed url. > > It's because you should be using a singular resource name to signify that you > are updating an

[rspec-users] oddness with messages_path

2011-11-26 Thread Cynthia Kiser
I am working through the Rails Views chapter in the RSpec Book and noticed something odd when I created a spec for the edit view. I am getting the wrong value from the messages_path helper. I was kind of wondering if it would work or not - but had expected it to fail by not giving me an id, not by

Re: [rspec-users] need some advice on the best way to structure testable shared methods

2011-11-14 Thread Cynthia Kiser
Quoting Patrick J. Collins : > describe Bar do > it_behaves_like "a nameable thingie", Bar.new(nil, nil) > end > > Which I don't like, mainly because Foo & Bar's initialize methods require > arguments, and I am having to do (nil, nil) which seems very uncool... Having trouble following your exa

Re: [rspec-users] Is it possible to execute 'lets' once for all 'its'?

2011-11-14 Thread Cynthia Kiser
Quoting JDeville : > The setup for certain integration specs is a bit slow, and I'm generally > careful to make my 'it' blocks read-only. However, I also like to keep my > it blocks extremely focused on just 1 thing. This has become a performance > problem though, because the setup is executed

Re: [rspec-users] Rspec not finding my examples

2011-11-12 Thread Cynthia Kiser
Quoting David Chelimsky : > Make this bacon_spec.rb Ahhh so easy. Works great. Thanks. -- Cynthia N. Kiser c...@ugcs.caltech.edu ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users