On Jan 5, 2011, at 11:11 AM, Abhik Pramanik wrote:
> Hi all,
>
> I'm trying to emulate the have_tag matcher that used to be in rspec-rails.
> How would I do that with the rspec 2 interface?
>
> html.should have_tag("div") do
> with_tag("span")
> end
>
> RSpec::Matchers.define won't let me pas
On Jan 6, 2011, at 7:49 PM, tashfeen.ekram wrote:
> I am sorry but it seems like this should be a simple answer.
>
> when i run a any rake command i get the following error:
>
> no such file to load -- spec/rake/spectask
See http://relishapp.com/rspec/rspec-core/v/2-4/file/upgrade
require 'rs
On Jan 7, 2011, at 11:34 AM, Volkan Unsal wrote:
> I am new Rspec and just started by generating a new controller on
> Rails 3. It generates some Rspec tests by default. I have a question
> about how to make them pass though. As it stands, I see this test in
> my terminal"
>
>> 1) BuildingsCont
On Jan 7, 2011, at 9:12 AM, Sarah Allen wrote:
> I don't see any cucumber scenarios on integration testing with webrat or
> capybara. Did I miss those?
You did not! They are just missing.
> or should we add some?
Yes! Please!!
> We have a couple of volunteer interns at Blazing Cloud
On Jan 7, 2011, at 8:41 AM, Sarah Allen wrote:
> Getting back to this after the holidays...
>
> David Chelimsky wrote in post #969342:
>> If you need to use spec/integration instead, then you'll need to tell
>> RSpec to include RSpec::Rails::RequestExampleGroup in tho
On Jan 5, 2011, at 4:06 PM, Steve Hull wrote:
> David Chelimsky wrote in post #949683:
>> have_tag wrapped assert_select in a way that was very brittle. Also
>> Webrat and Capybara matchers are better :)
>
> Any tips on how we can use the Capybara matchers in our helper s
On Jan 5, 2011, at 1:54 AM, Guru Prasad wrote:
> hi guys !
> I am pretty new to rspec and I am still learning.
> I tried to change the text in "it" block and then run the rspec with -e and
> -l flag with appropriate values.
>
> But it dint work.
>
> What i can think of is rspec must have store
This is a bug fix release recommended for all users who have upgraded to
rspec-rails-2.4.
### rspec-rails-2.4.1 / 2011-01-03
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.4.0...v2.4.1)
* Bug fixes
* fixed bug caused by including some Rails modules before RSpec's
RailsExa
On Sun, Jan 2, 2011 at 11:51 PM, David Chelimsky wrote:
> On Sun, Jan 2, 2011 at 11:01 PM, Jim Morris wrote:
>> Ok I re installed rspec-rails 2.4.0 looks like my request specs run,
>> and my model specs run but my
>> controller specs and helper specs do not run, and thro
ing bundler (1.0.3)
>> Using cells (3.4.2)
>> Using diff-lcs (1.1.2)
>> Using factory_girl (1.3.2)
>> Using thor (0.14.6)
>> Using railties (3.0.3)
>> Using rails (3.0.3)
>> Using factory_girl_rails (1.0)
>> Using haml (3.0.24)
>> Using nokogiri (1.4.4)
od obsolete within rspec-rails was:
https://github.com/rspec/rspec-rails/commit/fc5cdbb603f0e66f9f3d19a0a60a775e124fb218
If you have some time to investigate, please see if reversing that
commit solves the problem. Should point us in the right direction.
>
> On Jan 2, 7:46 pm, David Chelimsky wrot
On Sun, Jan 2, 2011 at 10:12 PM, Jim Morris wrote:
> Yes I can, the full app is on https://github.com/wolfmanjm/wolfmanblog_rails
> although I downgraded back to rspec-rails 2.3.1, before I did that my
> Gemfile.lock looked like...
Thanks for that.
The problem is with rspec-cells, but I'm not cl
On Sun, Jan 2, 2011 at 9:09 PM, Jim Morris wrote:
> I just upgraded from 2.3.1 and I now get this error on all my specs...
> Nothing else changed and the Upgrade.md does not indicate any backward
> compatibilities unless I missed something.
>
> (in /home/morris/work/ruby/rails3/wolfmanblog)
> /opt
Changes to rspec-core listed below. There are no functional changes to
rspec-mocks or rspec-expectations for this release.
Happy New Year!
Cheers,
David
### rspec-core-2.4.0 / 2011-01-02
[full changelog](http://github.com/rspec/rspec-core/compare/v2.3.1...v2.4.0)
* Enhancements
* start the
### rspec-rails-2.4.0 / 2011-01-02
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.3.1...2.4.0)
* Enhancements
* include ApplicationHelper in helper object in helper specs
* include request spec extensions in files in spec/integration
* include controller spec extensions in
On Sun, Jan 2, 2011 at 5:42 AM, Kristian Mandrup wrote:
> I'm using the latest ruby 1.9.3-head and recently whenever I run rspec
> (2.2+) I get the following error:
>
> I have seen others have run into this issue, but to resolve it just
> rolled back to a previous version of rspec or it there a be
On Jan 1, 2011, at 2:49 PM, Kevin Lochner wrote:
> David Chelimsky wrote in post #971793:
>
>> You only need ^^ rspec-rails here. It requires rspec, which requires
>> rspec-mocks. I'd actually recommend using this format:
>>
>> gem "rspec-rails", &
On Sat, Jan 1, 2011 at 1:12 AM, Kevin Lochner wrote:
> David Chelimsky wrote in post #971734:
>
>>
>> Can you post your Gemfile and spec/spec_helper.rb files? I'm guessing
>> there's a configuration problem of some sort.
>>
>> Cheers,
>> David
On Thu, Dec 30, 2010 at 3:02 PM, klochner wrote:
> Using: rspec 2.3 with rails3
>
> I'm unable to stub out the current_user method in my helper, not sure
> what I'm doing wrong:
>
> describe "link_to_current_user, When logged in" do
> it "should link to the given user" do
> helper.stub!(:
On Dec 30, 2010, at 4:37 PM, Kurt wrote:
> I just installed rspec-rails 2.3.1 gem into a new Rails 3.0.3 app, ran
> the rspec:install generator, but the system doesn't see any other
> RSpec generators (like rspec_controller),
There is an rspec:controller generator, but Rails hides it from you be
On Dec 31, 2010, at 1:48 PM, Kevin Lochner wrote:
> My helper tests broke when I upgraded to rails3/rspec2. I don't seem to
> be able to stub out methods in my helper tests.
>
> Anyone know what's going on here?
>
> #users_helper_spec.rb
> describe UsersHelper do
> describe "the helper" do
>
On Dec 29, 2010, at 12:01 AM, Shea Levy wrote:
> Hi all,
>
> What's the best way to handle features which rely on an external API in a
> behaviour-driven way? Suppose I have an app which manages online ordering
> from several independent stores, with a cut taken from each purchase, and I
> want
On Tue, Dec 28, 2010 at 3:01 PM, Tiago Fernandez
wrote:
> Hello,
> I am experiencing an issue with RSpec2, while running RCov. In my Rakefile,
> I have a task defined like this:
> namespace :test do
> desc "Run all specs."
> RSpec::Core::RakeTask.new(:spec) do |t|
> t.patte
On Tue, Dec 21, 2010 at 9:26 PM, JDeville wrote:
> Problem ---
>
>
> When I run autotest against my rails 3 app, I get some errors that
> seem to imply that my @ variables are not be cleared for each
> context. It happens only in my controller t
On Sun, Dec 26, 2010 at 12:05 AM, Zhi-Qiang Lei wrote:
> Hi,
>
> I have a lambda.
>
> Test = lambda { kill(333) }
>
> How should I spec if I want to make sure this Test will send kill message
> with 333? Thanks.
Depends on the scope in which the block will be evaluated. Since kill
is being calle
On Wed, Dec 22, 2010 at 2:28 PM, Suman Gurung wrote:
> I want to stub an after save method(which generates files and so, is
> time consuming), for most of my spec files apart from a few where that
> method is actually tested.
> I was trying to do this with using shared examples but with rspec 2, i
On Wed, Dec 22, 2010 at 12:58 PM, Daryn wrote:
> Hi,
>
> I was using WebRat and I had view specs that looked like this:
>
> describe "expenses/new.html.erb" do
> it "displays 'New Expense'" do
> render
> rendered.should include("New Expense")
> end
> end
>
> I am now using Capybara and you
gt; The reason I am asking is because the rspec-mode for emacs runs its
> specs from the directory the spec you are testing resides.
> I'll need to fix that if rspec is not meant to be run from there.
Yeah, that's the case.
Cheers,
David
>
> Thanks
>
>
> On Dec
On Dec 22, 2010, at 2:51 AM, Jim Morris wrote:
> Hi, not exactly sure if this is a cells bug or an rspec (or both), but
> when running a simple request spec
> from the spec/requests directory gets an error whereas running it from
> the RAILS ROOT directory it works..
> Seems it cannot find the vie
On Dec 21, 2010, at 2:11 PM, rejeep wrote:
> Hey,
>
> I have lots of problems to refactor RSpec macros and make them DRY.
> Right now I'm stuck in such a situation for some role macros.
>
> In my controller tests, I want to write:
>
> 1) it_should_grant_access(:super_admin, :to => :countries)
On Dec 20, 2010, at 10:54 AM, Thomas Andrews wrote:
> When I try to install rspec-rails it tells me:
>
> ERROR: Error installing rspec-rails:
> i18n requires RubyGems version >= 1.3.5
>
>
> I am using RubyGems 1.3.4, and I am locked down to that version at the
> client site. Is there a ver
On Dec 20, 2010, at 10:56 AM, Roger Pack wrote:
> Sorry if I mentioned this one before, but has anyone proposed being able
> to do something like
>
>
>"it should be able".to {
>
>}
>
> ? (or something like that)...
>
> Might be preferable where a test description doesn't start with "i
On Dec 18, 2010, at 5:32 PM, Sarah Allen wrote:
> David Chelimsky wrote in post #969325:
>> Per "Webrat and Capybara" on http://relishapp.com/rspec/rspec-rails, all
>> you should need now is this in your Gemfile:
>>
>> gem "capybara"
>>
&g
On Dec 18, 2010, at 2:11 PM, Sarah Allen wrote:
> In using RSpec for integration testing with Capybara, I was surprised
> thave I needed to do extra configuration. I started with the config
> from this blog post:
> http://codingfrontier.com/integration-testing-setup-with-rspec-2-and-ca
That blog
On Dec 17, 2010, at 8:12 AM, niku -E:) wrote:
> Hello.
> My name is niku.
>
> I'm using rspec 2.2.1
>
> /tmp% rspec --version
> 2.2.1
>
> I tested http://gist.github.com/744935 and passed.
>
> /tmp% rspec stdout_spec.rb
> ..
>
> Finished in 0.00105 seconds
> 2 examples, 0 failures
>
> But I
### rspec-rails-2.3.1 / 2010-12-16
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.3.0...v2.3.1)
* Bug fixes
* respond_to? correctly handles 2 args
* scaffold generator no longer fails on autotest directory
___
rspec-users mailing l
### rspec-core-2.3.1 / 2010-12-16
full changelog: http://github.com/rspec/rspec-core/compare/v2.3.0...v2.3.1
* Bug fixes
* send debugger warning message to $stdout if RSpec.configuration.error_stream
has not been defined yet.
* HTML Formatter _finally_ properly displays nested groups (Ja
On Dec 13, 2010, at 10:46 PM, Jonathan Linowes wrote:
> Is there a way for the html formatter to show nested "describe" blocks, as
> written in my examples.
Not supported yet. Patches welcome!
> Or perhaps I should change how I write my examples so nesting can be shown?
>
> eg
>
> describe My
On Mon, Dec 13, 2010 at 4:31 PM, djangst wrote:
> Hi, any idea what could cause the following error in a controller
> test?
>
> "count should have been changed by 1, but was changed by 0"
>
> I'm posting to a create route using a lambda, similar to Hartl's
> example in his Rails tutorial:
>
>
On Dec 13, 2010, at 7:55 AM, Brian Ploetz wrote:
> Anybody?
>
> On Dec 9, 3:22 pm, Brian Ploetz wrote:
>> Hi all,
>>
>> This is probably a stupid question, but I can't figure out how to do
>> this.
>>
>> If I have some routes which require SSL, how do I test that with
>> RSpec? For example
rspec-2.3.0 is released (including rspec, rspec-core, rspec-mocks,
rspec-expecations and rspec-rails).
### rspec-core-2.3.0 / 2010-12-12
[full changelog](http://github.com/rspec/rspec-core/compare/v2.2.1...v2.3.0)
* Enhancements
* tell autotest to use "rspec2" if it sees a .rspec file in the
On Dec 11, 2010, at 11:47 AM, Shea Levy wrote:
> Hi all,
>
> I was recently brought onto a Rails 2.2.3 project which was itself an
> emergency rescue of a spaghetti-coded PHP project (complete with hard-coded
> SQL statements!). Due to the fact that the code was already in production and
> has
On Dec 11, 2010, at 10:38 AM, Luis Lavena wrote:
> On Sat, Dec 11, 2010 at 12:54 PM, David Chelimsky
> wrote:
>>
>> FYI - Ryan Davis, in spite of his clear distaste for the approach [1],
>> just released ZenTest-4.4.2, which fixes this issue.
>>
>
> Now
On Fri, Dec 10, 2010 at 6:56 AM, David Chelimsky wrote:
>
> On Dec 10, 2010, at 1:18 AM, Michelle Pace wrote:
>
>> Thanks (again) Dave for your reply and the time you've taken.
>>
>> However I think I must be really bad at explaining myself... so I've
>&g
On Dec 10, 2010, at 6:14 AM, medihack wrote:
> Hello.
>
> Is it possible to also use the transactional examples feature for gem
> (not Rails) development.
Nope. That feature is not implemented in RSpec, it is implemented in Rails.
RSpec just provides access to it.
> It seems that one has to re
On Dec 10, 2010, at 1:18 AM, Michelle Pace wrote:
> Thanks (again) Dave for your reply and the time you've taken.
>
> However I think I must be really bad at explaining myself... so I've
> drawn a picture for you which to show my problem. [One of the
> requirements in the book is that I have to
On Thu, Dec 9, 2010 at 7:58 PM, Michelle Pace wrote:
> Hi David, sorry still no coconut. I should have explained myself better,
> I actually need to run the "autospec" command as the book says:
> "Thankfully, RSpec comes with a small script named autospec that
> reconfigures autotest to run specs
On Dec 9, 2010, at 8:57 AM, Sid W. wrote:
> David Chelimsky wrote in post #967419:
>> This is a regression that was introduced by an enhancement in
>> rspec-mocks-2.2. It has been reported, identified, and fixed, but not
>> yet released:
>>
>> https://github.co
On Thu, Dec 9, 2010 at 7:08 AM, Michelle Pace wrote:
> David Chelimsky wrote in post #967405:
>> # autotest-4.4.6 (with ZenTest-4.4.1)
>> autotest --style rspec2
>
> Sorry David, truth be told I'm a ruby newbie working my way
> through the new book "Continuous
On Dec 8, 2010, at 10:39 PM, rails.impaired wrote:
> I'm new to rspec, so, I might be coloring outside the lines, but,
> there have been several instances where I have wanted to display a
> comment or note.
>
> for example:
>
> describe "truck" do
> it "should require model" do
> end
> end
>
On Thu, Dec 9, 2010 at 6:43 AM, Sid W. wrote:
> I'm running into this issue as well. Surely someone has a solution?
> Seems to be Rails 3.0.3.
Please be sure to quote relevant parts of the thread to provide
context for people who are reading on phones, etc, that don't make it
easy to see an entir
On Dec 9, 2010, at 6:19 AM, David Chelimsky wrote:
>
> On Dec 8, 2010, at 11:22 PM, Michelle Pace wrote:
>
>> Kristian Mandrup wrote in post #917121:
>>> As of beta.4, you’ll have to do add this configuration manually. Just
>>> create an autotest directory in
On Dec 8, 2010, at 11:22 PM, Michelle Pace wrote:
> Kristian Mandrup wrote in post #917121:
>> As of beta.4, you’ll have to do add this configuration manually. Just
>> create an autotest directory in the root of your project, put the
>> following statement in ./autotest/discover.rb:
>>
>> Autote
On Dec 6, 2010, at 8:12 PM, Andrew Kasper wrote:
> Hi gang.
>
> I've come across what I believe to be unexpected behavior for some of my
> before :each blocks, and I wonder if anyone can enlighten me as to why this
> is happening.
>
> The surprising thing happens when I run a 'before :each' in
On Sun, Dec 5, 2010 at 9:39 PM, Bharat wrote:
> I have a simple model as shown below:
> # == Schema Information
> # Schema version: 20101101014544
> #
> # Table name: base_folders
> #
> # id :integer not null, primary key
> # name :string(255)
> # created_at :datetime
> #
On Sun, Dec 5, 2010 at 6:19 PM, DK wrote:
> Hi all, anyone have an idea why I am getting an error trying to 'rake
> spec':
>
> 'kernel.rb:27:in `should': uninitialized constant RSpec::Expectations
> (NameError)'.
Looking through the code I can see why this might be happening, but
I'm at a loss as
On Sat, Dec 4, 2010 at 5:07 AM, Jim Morris wrote:
> This his been discussed but the only definitive answer (kinda) was
> use...
>
> describe "a description" do
> system { SomeController }
subject {SomeController.new}
HTH,
David
>
> end
>
> However when I do that I get this error...
>
> @con
tation
date_type == "season_start" # in the factory
HTH,
David
> end
> end
> Agreed regarding the redundant test - I just put that in when things
> went wrong.
> Thanks for responding
>
> On Dec 4, 2:25 am, David Chelimsky wrote:
>> On De
On Dec 3, 2010, at 8:11 PM, Erik Helin wrote:
>
>
> On Fri, Dec 3, 2010 at 16:43, Matt Wynne wrote:
>
> On 1 Dec 2010, at 05:47, helino wrote:
>
> > Hi everyone,
> >
> > I've started learning Ruby and RSpec, and I've ran into a small
> > problem. I have one "before" functions which run befor
On Dec 2, 2010, at 4:53 AM, Piotr Zolnierek wrote:
> Is it possible to read which formatter is being used? For instance if -
> f d is used to output additional information or is there a better way
> to do that?
For now you can get it from RSpec.configuration.formatter, but that is a)
unofficial
On Dec 3, 2010, at 11:07 AM, Martin Hawkins wrote:
> Ruby 1.9.2, Rails 3.0.3, Rspec-rails 2.2.0
>
> I have:
>
> Factory.define :season_date do |f|
> f.season_date Date.new(2011,9,24)
> f.date_type "season_start"
> end
>
> RSpec.configure do |config|
> config.mock_with :rspec
> end
>
> Facto
On Dec 2, 2010, at 4:31 AM, Log0 wrote:
> Hi all,
>
> I am new to RSpec, currently using rspec-rails (2.1.0) with rails (2.2.3)
For rails-2 you need to use rspec-rails-1.3.1 (rspec-rails-2.x supports only
rails ~> 3.0).
> and ruby (1.8.7). I can get RSpec running however the stacktrace when i
On Dec 2, 2010, at 10:12 AM, Martin Volerich wrote:
> David:
>
> Glad to see that your book was just published. It's been a life-changing read!
>
> I'm struggling with the best way to integrate autotest working in a rails
> project with RSpec 2. The latest autotest 4.4.6 gem seems to retire it a
On Dec 2, 2010, at 4:20 AM, Andi Schacke wrote:
> Hi
>
> in the config block of rspec I have a before block to reset my
> database before each spec:
>
> config.before(:each) {DatabaseCleaner.clean}
>
> I know I can apply this before to a specific type, e.g.
>
> config.before(:each, :type => :
On Nov 29, 2010, at 2:24 PM, E. Litwin wrote:
> I'm getting undefined local variable or method `users_path' (as an
> example) my request spec tests after upgrading to 2.2.0 from 2.1.0.
Grab the rspec-rails-2.2.1 release, which fixed a bug that I think, as a
side-effect, will resolve your issue.
On Dec 3, 2010, at 5:37 AM, Zhi-Qiang Lei wrote:
> Hi,
>
> This piece of code does not work. Does anybody know the cause?
>
>
> describe "/loan-events/{source-id}-lend.json" do
>describe "GET" do
> it "should call all method of LoanEvent with source_id" do
>source_id = rand(10
On Dec 2, 2010, at 1:34 PM, Andy Koch wrote:
> is there a listing of the Spec::Runner configuration options
> somewhere?
For RSpec-1: http://rdoc.info/gems/rspec/1.3.1/Spec/Runner/Configuration
For RSpec 2, the options get defined via metaprogramming (a great example of
the downside of metaprog
On Dec 2, 2010, at 1:44 AM, Scott Bellware wrote:
> I've tried three test spy mocking frameworks for RSpec that I know of.
> Presently, all three (Not A Mock, RR, rspec-spies) don't work with
> RSpec 2.
Have you contacted the maintainers of the projects that offer spies? I'm a bit
surprised they
On Dec 1, 2010, at 11:30 AM, Matt Smith wrote:
> Hello all.
>
> Just a little frustration moment here and hoping someone can explain to me
> what is going on.
>
> I had a passing view spec using >= rspec-rails2. Then after updating to
> 2.1.0-2.2.1 it always fails. Thinking I was crazy I buil
### rspec-rails-2.2.1 / 2010-12-01
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.2.0...v2.2.1)
* Bug fixes
* Depend on railties, activesupport, and actionpack instead of rails (Piotr
Solnica)
* Got webrat integration working properly across different types of specs
* De
On Nov 30, 2010, at 2:11 PM, Jo Liss wrote:
> On Tue, Nov 30, 2010 at 7:21 PM, David Chelimsky wrote:
>> Or is there a problem you're trying to solve by intermingling them?
>>
>> I'd recommend keeping specs under the spec directory and run them separately
>&
On Nov 30, 2010, at 10:28 AM, Jo Liss wrote:
> One more thing: If instead of "test 'something'" I write "def
> test_something", like so:
>
> require 'test_helper'
> class FirstTest < ActiveSupport::TestCase
> def test_something
>assert_equal 42, 84
> end
> end
> class SecondTest < ActiveS
any such thing, so I'll look into it and
if I can address this in rspec-rails I will and have a bug-fix release out soon.
Thanks!
David
>
> On Nov 29, 2:45 pm, David Chelimsky wrote:
>> On Nov 29, 2010, at 4:44 PM, David Chelimsky wrote:
>>
>>
>>
>>
On Nov 29, 2010, at 4:44 PM, David Chelimsky wrote:
>
> On Nov 29, 2010, at 3:28 PM, Jim Morris wrote:
>
>> Sorry I may have been unclear
>>
>> When using the default spec_helper as generated from a fresh
>> script/rails generate rspec:install
>> I g
est rails/rspec/webrat does not work
> out of the box.
It does for me, so something is different between our configurations.
Do you have webrat in the Gemfile?
Is this a controller spec? If so is it in the spec/controllers directory?
>
> On Nov 29, 7:18 am, David Chelimsky wrote:
### rspec-core-2.2.1 / 2010-11-28
[full changelog](http://github.com/rspec/rspec-core/compare/v2.2.0...master)
* Bug fixes
* alias_method instead of override Kernel#method_missing (John Wilger)
* changed --autotest to --tty in generated command (MIKAMI Yoshiyuki)
* revert change to debugge
c issue, and is unnecessary with rspec. I'd
just re-generate it with "script/rails generate rspec:install"
HTH,
David
>
> On Nov 15, 3:36 pm, David Chelimsky wrote:
>> On Nov 15, 2010, at 4:51 PM, Peter Havens wrote:
>>
>>
>>
>>> I
On Nov 29, 2010, at 8:04 AM, Chuck Remes wrote:
>
> On Nov 28, 2010, at 4:35 PM, David Chelimsky wrote:
>
>> ### rspec-core-2.2.0
>>
>>
>> * Performance improvments (see
>> [Upgrade.markdown](https://github.com/rspec/rspec-core/blob/master/Upgrade.mar
### rspec-core-2.2.0
[full changelog](http://github.com/rspec/rspec-core/compare/v2.1.0...master)
* Deprecations/changes
* --debug/-d on command line is deprecated and now has no effect
* win32console is now ignored; Windows users must use ANSICON for color
support
(Bosko Ivanisevic)
*
On Nov 25, 2010, at 11:44 AM, James Palmer wrote:
> Under the older version of rspec, I'm able to run my script successfully
> by running "spec randomperform.rb"
>
> I've now installed the newest rspec, and it does not work for me. If I
> run the command:
>
> rspec randomperform.rb
>
> I get t
On Nov 25, 2010, at 7:16 PM, Kaoru Kobo wrote:
> Then I found this page:
>
> ”Upgrade to 1.3.0 - Matcher DSL"
> Upgrade.rdoc at master from dchelimsky's rspec - GitHub
> http://github.com/dchelimsky/rspec/blob/master/Upgrade.rdoc
>
>
> and, I found the tentative solution:
> (Is there the better
On Nov 28, 2010, at 2:06 AM, medihack wrote:
>> That's my 2¢, but feel free to try to convince me otherwise :)
>
> Ok, I'll give my best ... how about a dollar? ;-)
>
>> I understand that chains like this are common in Rails apps thanks to good
>> ideas like composable finders (which generally
On Nov 26, 2010, at 2:24 AM, medihack wrote:
> David, sorry for double posting (it seems I am working too much and
> forgetting about what I already asked) ... and thanks for your answer.
> How about a bit more convenient way for future releases. Something
> like:
> MyModel.stub_chain(:tag_counts,
On Nov 23, 2010, at 12:26 AM, macarthy wrote:
> Can someone tell me what the latest versions for rspec / cucumber for
> a rails 2.3.10 project?
>
> Currently I get this error
>
> $: script/generate rspec
> Couldn't find 'rspec' generator
>
> My enviroment.rb :
>
> config.gem 'rspec-rails',
On Nov 25, 2010, at 12:31 PM, Pedro Brasileiro wrote:
> Try Deal.new.should be_valid?
No, don't. That doesn't work, and what I wrote below does :)
Cheers,
David
>
> On Thu, Nov 25, 2010 at 9:19 AM, David Chelimsky wrote:
> On Tue, Nov 23, 2010 at 11:32 PM, R
On Nov 25, 2010, at 8:33 AM, Jonathan Linowes wrote:
> On Nov 25, 2010, at 9:20 AM, David Chelimsky wrote:
>
>> On Nov 20, 2010, at 7:07 PM, Volkan Unsal wrote:
>>
>>> I want to generate boilerplate code for existing controller, models
>>> and views. Is ther
On Nov 20, 2010, at 7:07 PM, Volkan Unsal wrote:
> I want to generate boilerplate code for existing controller, models
> and views. Is there a command or a gem that lets me do that?
You can't see them because rails hides them, but:
rails generate rspec:model
rails generate rspec:view
rails gener
On Thu, Nov 25, 2010 at 12:10 AM, Arun Sharma wrote:
> thanks for reply
>
> my other methods in spec file it is working
> properly(index,edit,update...)
>
> but here it creates a probelm.bascially except CRUD opertion it is not
> working.
>
> get :automatic_partitions,{:harddrive_id=>'sda',:serve
On Wed, Nov 17, 2010 at 12:49 PM, Jack Kinsella wrote:
> Hi,
>
> In Rails 3 you deliver a mail message with the
> ActionMailerModel.method.deliver syntax (e.g.
> Notifier.welcome_message.deliver). How do you test that this method is
> called in Rspec. I'm looking for an equivalent to "stub_chain"
On Nov 24, 2010, at 11:09 PM, 白井 薫 wrote:
> I have a question about the custom matcher using Matcher#define.
>
> My intention is given by the following code:
>
>
> Spec::Matchers.define :be_done do
> match do |block|
>
On Tue, Nov 23, 2010 at 11:32 PM, Rick wrote:
> Hi all,
>
> I'm using rspec-rails and have a simple model spec which fails with
> the following trace:
>
> undefined local variable or method `be_valid' for # 0x0102c6e820> (NameError)
>
> Full trace: https://gist.github.com/713164
>
> The spec i
On Nov 24, 2010, at 3:39 PM, Robert Dober wrote:
> Hi all
>
> I am puzzled about the rspec tests that are generated by Rails3
> scaffolding. I am however not sure if this is the correct place to
> discuss this issue.
> It might be that a rails ML/chat is better suited for that kind of
> discussio
On Nov 23, 2010, at 7:12 PM, medihack wrote:
> Hello.
>
> I am trying to test if in a method calling chain one of the methods
> get a specific parameter. In the below code for example MyModel must
> receive the parameter 0 for the method "offset". Unfortunately the
> code below does not work. It
On Nov 24, 2010, at 1:07 AM, Arun Sharma wrote:
> hii
>
> I am initial level of rspec. I am getting a error nil class.
>
> My Controller code is as follows
>
> class UsersController < ApplicationController
> before_filter :have_hard_drive?
> # # filter check for authorized user to access cur
On Nov 20, 2010, at 9:49 PM, Doug E. wrote:
> Problem discovered, but not solved. It isn't an rspec problem. It's
> caused by nifty-authentication's use of Mocha's any_instance.
> users_controller_spec.rb's last test calls:
>
>User.any_instance.stubs(:valid?).and_returns(true)
>
> This is fi
On Nov 20, 2010, at 10:12 PM, Nick Hoffman wrote:
> Hey guys. My ApplicationController rescues
> Mongoid::Errors::DocumentNotFound errors like this:
>
> class ApplicationController < ActionController::Base
> rescue_from Mongoid::Errors::DocumentNotFound,
>:with => :resource_not_found
>
On Nov 18, 2010, at 8:38 AM, Andrew Davis wrote:
> Thank you very much for your response. I'll give it a go this afternoon!
>
> Now, you mentioned, "Please post backtraces when you have failures."
>
> Do you mean a section of the test.log? Because RSpec only informed that
> that it expected tru
On Nov 17, 2010, at 2:16 PM, Andrew Davis wrote:
> Hello, I'm still pretty new to Rails, and I've used rspec on all of my
> models with success.
Welcome!
> Now I'm working on the controllers, but I'm having
> difficulty. Everything I try is giving me a response of false,
Please post backtraces
On Nov 17, 2010, at 5:37 AM, David Chelimsky wrote:
> On Nov 16, 2010, at 8:16 AM, Matt Darby wrote:
>
>> I've been looking for the definitive answer for months now, and the
>> RSpec book doesn't touch on it at all:
>>
>> How do we now handle stubbing
On Nov 17, 2010, at 3:06 AM, medihack wrote:
> I just solved the problem by including the below code in my acceptance
> helper. If you are not Steak then just simply put it in spec helper or
> require it from somewhere else. post and xhr methods are now available
> in that spec regardless in what
501 - 600 of 3589 matches
Mail list logo