similar to: RSpec-1.1.0 is released

Displaying 20 results from an estimated 600 matches similar to: "RSpec-1.1.0 is released"

2007 Dec 13
16
"Tricks" for testing after_create callback???
I''ve got a model Message, which needs to send an email using action mailer after it''s first saved in the database. I want to pass the model to the mailer which then uses methods on the message model to render the email. So the natural way to do this is in an after_create callback on the Message model. But I can''t see an easy way to test this. Here''s my spec
2007 Dec 27
5
ExampleGroup and SharedExampleGroup relationship(?)
I''m working on a series going over the source code for rspec, and I ran into something interesting with ExampleGroup and SharedExampleGroup. I was wondering if anyone could shed light on it. [NOTE: I''m working through the code for my own edification in learning Ruby. Ruby has some features that I think are incredibly cool, so I''m using a concrete implementation (RSpec)
2008 Oct 18
4
Problems when programmatically defining examples
Hi, I am trying to code an application that is based on Rspec; I am programmatically building examples, and launching the runner with a custom formatter. Here are the code snippets from my app: Launching the runner: example_groups = test_expectation.example_groups_for(system_state) @output = StringIO.new options =
2010 Sep 01
2
Undefined methods: has_selector? and flunk
I''m in the process of updating an app for Rails 3.0 and rspec-rails 2.0.0.beta20. When I''m running my specs (rake spec) I get a large number of errors caused by two undefined methods undefined method `has_selector?'' for #<String:0x7fdbd0b5b270> undefined method `flunk'' for
2010 May 07
2
Rspec beta8: helper methods issues
Hello everybody, I am experiencing the following problems, I googled quickly but I couldn''t find any documentation or solution to those issues: 1) the generator rails g rspec:helper does nothing; 2) there seems to be no way to test helper methods as I used to do... for example the following spec it ''should set monday as first day of the week'' do
2007 Nov 18
8
helper methods starting with should
Hi all, As an experiment in playing nice with others, we''ve added the ability in rspec''s trunk to do this: class ThingExamples < Spec::ExampleGroup def should_do_stuff ... end end This is how rspec 0.1 worked, and for people already comfortable with the classes/methods approach of Test::Unit, it is a more comfortable entry point to rspec. For others, however, it
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
Hello, Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test, if self.create method can take more than two arguments. But, when I try to run my test. It showed *PdfHelper Should have two arguments Failure/Error: create_pdf.should_receive(object,template).with(user,file) NameError: undefined local variable or method `create_pdf'' for
2016 Oct 12
4
Samba 4.5.0 dbcheck problems
Hi all, I've recently upgraded all our DC's (we have 9 spread over various global Sites) to 4.5.0. I run a dbcheck on our FSMO-owner DC once per day from a cron job and this threw up a ton of errors on the first pass after the upgrade. After running it several times with the --fix flag I've got the errors down to 603 but these last errors are refusing to be removed. Here is an
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta. 19" . I have following code at spec/models/user_spec.rb require ''spec_helper'' describe User do it { should validate_presence_of(:email) } it { should validate_presence_of(:name) } end Here is my gemfile group :development, :test do gem ''factory_girl_rails'',
2016 Oct 14
4
Joining a Windows Server 2008 R2 to existing Samba4 domain
Hi Marc, Thanks for your reply. We are using BIND9_DLZ currently as the DNS backend I manually selected a replication partner (the FSMO roles DC). We do have some errors when doing a dbcheck but I'm not able to fix them. I've detailed this in another post. Here is an example of each type: Example1: *ERROR: incorrect GUID component for member in object
2010 Jun 20
10
RSpec 2 view example: render_template
On http://github.com/rspec/rspec-rails under "View specs" there''s an example describe "events/index.html.erb" do it "renders _event partial for each event" do assign(:events, [stub_model(Event), stub_model(Event)]) render view.should render_template(:partial => "_event", :count => 2) end end Is this indeed correct? From the
2008 Mar 05
14
ActiveRecord, spec''ing find has right :order parameter
I''m wanting to write a spec that a model is applying an :order option to a find call, but I don''t want to completely specify all of the find parameters. So I want to write something like this, say in a controller spec User.should_receive(:find).with(:all, hash_with_at_least(:order => ''user.name ASC'')) get ''index'', :sort =>
2007 Nov 30
4
Autotest''ing specs on non-rails app
I''m having trouble using autotest with rspec on a non-rails project. my Rspec gem is version 1.0.8, ZenTest is 3.6.2 project structure $ ls * lib: parser.rb spec: parser_spec.rb autotest finds and runs the spec, but it won''t detect changes to lib/parser.rb I know it''s something stupid, but... help? -- Rick DeNatale My blog on Ruby
2008 May 16
3
Which rspec for rails 2.1RC1?
I''m working on porting our app. Do I need to upgrade rspec from 1.1.3? If so which version. BTW the installation doc at http://rspec.info/documentation/rails/install.html seems to be stuck in the pre-git days. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/
2008 Jan 29
3
I thought the RSPec community might be interested
in my latest blog posting :http://talklikeaduck.denhaven2.com/articles/2008/01/29/why-i-dont-mind-using-rspec-in-fact-ive-come-to-love-it -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/
2009 Apr 26
9
Problems running features with Textmate Cucumber bundle
I finally plunked down for the beta RSpec bundle and I''m working through the initial example. Although I''m a fairly experienced RSpec user, I''m stlll learning new tricks. Anyway, I''m going though the mastermind example, and everything is going well, except that I decided to also try out the Textmate bundle for Cucumber. I decided to use Ben Mabey''s
2008 Mar 14
5
Branching scenarios, GivenScenario and database
I''m trying to use stories to drive some high-level design. I''ve got some branching scenarios where I want to follow a scenario, to establish a base situation, and then have different scenarios which ''branch'' out from that state, possibly several levels deep. I asked a bit about this a few days ago, and David pointed out the rather undocumented GivenScenario
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it seems that there''s a hole in Rails integration testing and multipart form posting. David offered to incorporate a patch to story runner at the end of the
2009 May 24
11
Class method not being stubbed
Hi guys. I''m setting an expectation on a class method. For some reason, the method isn''t being stubbed, and the expectation isn''t seeing the call. In KeywordListsController#create, I call the private method #create_keywords_and_associate, which calls AdSenseHeavenParser#parse . Thus, some of my specs set an expectation on AdSenseHeavenParser#parse . However, that
2008 Mar 08
3
should_receive(:foo).with(any_object)
Hey, I just ran into a situation where I would like to expect a method call with an argument I know and another one, which is a random number. I think mocking up the rand method is somehow ugly so I thought maybe this is the first time where I can take something from Java to Ruby ;) Java''s EasyMock mocking library knows things like "anyObject()" and "anyInteger()" in