search for: patchspac

Displaying 20 results from an estimated 31 matches for "patchspac".

Did you mean: patchspace
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2008 Dec 02
11
Any plans for Before-feature or Before-all steps in Cucumber?
...ing to get even slower. Are there any plans to add BeforeStory or BeforeAll blocks to Cucumber? With this I could start everything once and add reset code to each daemon. Ashley [1] http://blog.phusion.nl/2008/08/25/daemon_controller-a-library-for-robust-daemon-management/ -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
2008 May 27
8
new --pattern option
Hello. You''re saying that: To get rspec to behave as it did before this change, use this: --pattern "**/*.rb" I tried like this (rspec 1.03) and it wasn''t same as before (rspec 1.08). Now it also loads all other files in current directory and in all subdirectories and not only from directory and subdirectories given to spec as a parameter. So, for example, I have
2008 May 18
2
Using Hash to mock classes that respond to :
...2 migration 2" => @migration_d } What I''m really interested in is what happens to (some of) the four migrations, not the migration graph itself. I just wondered if anyone else did this. Generally doing unusual things is a sign something is amiss. Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
2009 Oct 14
14
spec-ing private methods?
On Wed, Oct 14, 2009 at 5:49 PM, Scott Taylor <scott at railsnewbie.com> wrote: > > On Oct 14, 2009, at 3:36 PM, Joaquin Rivera Padron wrote: > > hello there, > how do you tipically spec private methods? The thing is ? have something > like this: > > def some_method > ?? complex_method + other_complex_methods > end > > private > def complex_method...
2008 Mar 17
8
should have_tag outside Rails
Hi Google has not helped me here. I''m looking for a way to use the have_tag assert_select wrapper outside RSpec on Rails (but in a Rails project) so I can use it to check text strings. Has anyone managed this? Thanks Ashley -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 May 20
4
mock_model not stubbing model attribtues in view spec
Hi -- I am just getting to grips w/ view specs, and am having an issue with mock_model not stubbing the mocked model''s attributes. For instance, I have the following: <CODE> before do @input_timesheet = mock_model( InputTimesheet ) assigns[:input_timesheet] = @input_timesheet end it "should display a table element" do render
2008 Mar 13
22
Specifing methods in a steps_for block
Hey list, I''m refactoring some much-used functionality into a common_steps step group. Methods like this are in there: steps_for :common do Given "a number of existing $types?" do |type| @initial_item_count = type.singularize.classify.constantize.count end When "the user adds an invalid $type" do |type| post
2008 Apr 29
5
Sharing: dont_repeat_yourself plugin custom RSpec matcher
I wrote a Rails plugin which uses simian to look for duplicates lines in your code and reports in html format, Textmate or Netbeans. I wrote it using RSpec and I have included a RSpec custom matcher: it { rails_application. with_threshold_of_duplicate_lines(4). should be_DRY } If you use Autotest, your specs will fail the next time you do a nasty copy-paste !!! More details in
2010 Jul 05
0
ShRUG 8, Mon July 12th: Introduction to RSpec
Hi all Reposting this for the benefit of anyone who may be able to attend but wouldn''t normally see ShRUG announcements. ShRUG is the Sheffield (UK) Ruby User Group. ShRUG July 2010 is now confirmed. Ashley Moran (that''s me) of PatchSpace Ltd (that''s also me, really) will be running an introduction to RSpec, a powerful and mature BDD/testing library for Ruby*. No RSpec or unit testing experience is necessary, as we will be starting from first principles, but knowing basic Ruby will help. We''re at the new GIST Lab...
2008 Nov 07
15
any tricks re using " eql(5.5)", but where 5.5 is a decimal not float?
-- Sent from my mobile device
2008 May 23
3
RailsExampleGroup
So I have a describe which is a subclass of RailsExampleGroup. I inserted some data into my database, and reconnect! my connection. Before reconnect, finding the data I just created is fine. The data cannot be found, after reconnection, the data is gone. It''s not in the database. It looks to me the data is not actually inserted into the DB at all, just somehow buffered somewhere. Would
2008 Nov 04
9
RSpec and PostgreSQL not playing nicely together
Here is a very simple spec: -- require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'') describe Product, "The Product model" do describe "When a new blank product object gets created" do before(:each) do @product = Product.new end it "should not be valid" do @product.should_not be_valid
2009 Oct 22
4
spec failing to run specs when spec.opts is present on 1.2.9
Hi I ran across the following when running spec on an old merb app. $ cat spec/spec.opts $ spec spec/models/topic_spec.rb Options written to spec/spec.opts. You can now use these options with: spec --options spec/spec.opts $ cat spec/spec.opts spec/models/topic_spec.rb $ spec spec/models/topic_spec.rb Options written to spec/spec.opts. You can now use these options with: spec --options
2008 Dec 03
3
Intermittent Cucumber exception
...y/gems/1.8/gems/cucumber-0.1.10/bin/../lib/ cucumber/cli.rb:167:in `execute!'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.10/bin/../lib/ cucumber/cli.rb:11:in `execute'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.10/bin/cucumber:6 rake aborted! -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
2008 May 23
10
View Specs vs. Stories
Do RSpec stories make view specs redundant? Does anybody spec their views *and* use stories, and if so how? Any views (no pun intended) appreciated. ~ Thanks Mark -- Posted via http://www.ruby-forum.com/.
2009 Oct 20
8
Stub that returns hash values
Is it possible to create a stub that returns hash values. For example I would like to convert this: @siteItem = stub(''plmSiteItem'', :one => "uno") To something like this: @siteItem = stub(''plmSiteItem'', {''one'' => ''uno'', ''two'' => ''dos''} ) So that I can do this:
2008 Nov 04
8
Testing a wizard with Cucumber
Assuming you have a multi-step wizard like thing, with lots of different states and paths through it. What approach would your use to write a feature for it? What I want to do is do the separate states and then reuse these things in more complex scenarios that cover paths. For example Scenario: State A Given I''m ... And I''m ... When I ... Then I should see And I at
2008 May 18
0
Spec a before_destroy callback in Sequel
...about the external code in my stub * stubbed out a method on the object under test In sort, it''s suckitude of the highest order. But I don''t know how to do this without resorting to an in-memory SQLite database or something. Any help much appreciated. Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
2008 May 21
1
Testing REST webservices? (Not Rails)
Hi, I am new to RSpec and BDD. I was wondering if RSpec specifications are a good solution for testing REST webservices (not implemented in Rails). If so, what would be a good way to test something like the API described below? =========== GET http://localhost/workflow text/xml Result: 200 OK <?xml version="1.0"?> <workflows>