search for: mattwynn

Displaying 20 results from an estimated 58 matches for "mattwynn".

Did you mean: mattwynne
2009 Feb 05
2
[Cucumber] Progress Bar
Inspired by Nick Evans'' RSpec progress bar[1], I had a little crack at implementing the progress bar for cucumber, ''cause I want to know how long a break I can take while the features are running :) It''s in my fork, in the coverage_formatter branch: http://github.com/mattwynne/cucumber/tree/master It will dump failing feature, scenario, step and the exception as the features run. No specs for it, it''s just a spike. [1]http://ekenosen.net/nick/devblog/2008/12/better-progress-bar-for-rspec/ Matt Wynne http://blog.mattwynne.net http://www.songkick.com
2011 Sep 13
12
Assertions for asynchronous behaviour
...pful. Is there anything else already out there? [1] http://www.growing-object-oriented-software.com/ cheers, Matt -- Freelance programmer & coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Helles?y) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110913/cd84b813/attachment.html>
2011 Mar 04
5
How to intercept an instance method from StdLib (1.9.2)
Hi, I''m struggling with something that seems to be simple, and I''ve not had any joy following the RSpec books suggestions (p. 187). I''d like to test that a method raises and error when a file is not found. I''ve tried adding this in my example just before I call my method, but it never seems to get invoked. Pathname.stub(:exist?).and_return(false) The whole
2008 Sep 09
12
cucumber - mark a step as pending
I love the way I can throw a call to pending() in the top of an unfinished RSpec example and stop it from failing the build. Is there a similar way to do such a thing with good ole'' cucumber? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.or...
2008 Aug 27
3
array_including()
...other) ok = true @array_to_match.each do |item| ok = ok and other.include?(item) end ok end end def array_including(array_to_match) ArrayMatcher.new(array_to_match) end Is there already something in the framework that does this? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.or...
2008 Sep 13
3
RCov / RSpec segfaults on Ubuntu
...our projects consistently segfaulted on this line: /vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb:41: [BUG] Segmentation fault Any pointers greatly appreciated. cheers, Matt [1]http://eigenclass.org/hiki/rcov+FAQ#l11 [2]http://eigenclass.org/hiki/rcov-0.8.1 ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.or...
2008 Sep 26
6
BDD / cucumber thought - chaining ''Then'' steps with Which
...d be able to see, and decorate it with more specification in a subsequent step or steps. Obviously, I could roll these into one long Then step, but maybe this is more elegant... Just thinking out loud. I have no idea what the steps code would look like. WDYT? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.or...
2009 Feb 05
3
[Cucumber, Webrat] Error backtraces shown as HTML in console
...;s helpful enough to see it when save_and_open_page does its thing, but I''m pretty used to reading plain old stacktraces in the console - the HTML output is very hard to read. Is this a known issue, or a feature, or have I just got something configured wrong? Matt Wynne http://blog.mattwynne.net http://www.songkick.com
2008 Sep 24
19
How to define request.domain in when testing
Hi, My application relies on request.domain for doing its job. The problem I am encountering, is that when running tests, request.domain returns "test.host", how can I change that so that it returns "mysite.com"? Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2008 Dec 13
4
Reuse of Cucumber Features
What''s the best way to handle a requirement that shows up as a sub-requirement requirement in other features? For example let''s say users can enter dates in various forms throughout my application. There is one set of global rules specifying the formats in which dates may be entered, and how they are interpreted. I put that in one feature. In various other features, like
2009 Mar 05
8
Can I construct the controller myself in a controller spec?
Hi I am experimenting with Constructor based dependency injection for rails controllers. So I have something like this class LoginSessionsController < ApplicationController def initialize(authenticator = TheRealAuthenticator) @authenticator = authenticator end .... end The plan was to override the authenticator used when testing with something like describe
2008 Aug 15
7
Autotest and subclasses / namespaces
...#39;'m pretty used to just hitting CTRL-C to get autotest to re-load all the files, or flicking to the spec file, and saving it to get a similar effect. But it is fairly irritating. Any suggestions for how to hack autotest to get this to flow more nicely? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080815/5f348bd8/attachment.html>
2009 Apr 16
6
Cucumber - step negating another expecting step
...form$/ do | maybe| has_matching_tags = current_dom.css(''form#frmSearch'').length > 0 assert has_matching_tags == (maybe == "should") end I think that would work. It''s shorter, but is it much easier to understand? Matt Wynne http://blog.mattwynne.net http://www.songkick.com
2008 Aug 26
9
stub_model() and ActiveRecord Associations
...need to do is express my mock like... (commence pseudo code) Comment.should_receive_instance_method(:merge_in).with (...).on_an_object_matching{|o| o.id = @target_comment.id} (/pseudo code) Has anyone else come across similar issues? How did you approach them? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.or...
2011 Oct 18
8
rspec 1.3.2, Rails 2.3.14 - plugins not loading
Hi there I have a weird situation. I have inherited a project in Rails 1.2.3 that has been upgraded to Rails 2.3.14 (and is running). I have installed Cucumber and Rspec to start to write features/tests for the new code that needs to be written. In my Gemfile, these Gems are loaded: group :test do gem ''rspec-rails'', ''~> 1.3.4'', :require =>
2009 Nov 17
8
rspec-rails gem double quoting (My)SQL?
Hi all, This seems like a plugin conflict (I haven''t yet had success replicating this in a new project), but short version is: when I have "rspec-rails" in my environment.rb plugin config, table names are double quoted in mysql queries generated by my standard finders. rspec-rails commented out: SELECT * FROM `users` WHERE (`users`.`id` = ''159564615'')
2008 Sep 09
8
Cucumber and fixtures/FixtureReplacement
Hey guys, I''d never used RSpec Stories before, so I decided to follow the apparent direction of the wind and just jump right into cucumber. I''m dabbling with/using Cucumber and really like it. Good job, aslak! Where i''m struggling right now is using either fixtures or a model factory methodology like the FixtureReplacement. In both cases, I''m not
2008 Sep 13
4
rake does recognize "rake examples_with_rcov"
Hi, Q1 - Know why rake doesn''t recognize "rake examples_with_rcov" per http://rspec.info/documentation/tools/rcov.html ? Q2 - Also when I run "rake spec:rcov" it seems to give me the same as if I just run "autotest" or "rake spec". I was expecting a heap of pointers to code I haven''t tested?
2008 Nov 07
13
features and form filling - going declarative?
I''m working on writing features for a wizard. The wizard collects information from a number of different forms, and you can navigate through it in a number of ways. Anyhow one of these forms is a customer form collecting name, and email. In the context of the wizard I feel that the following scenarios Scenario: Given I step to customer And I fill in my customer details
2011 Dec 05
5
Spec'ing a block
Hi folks How would you spec something like this: as_user username do FileUtils.chmod_R 0755, "#{directory}/*" end Where as_user fires off a new process (and set uid to username). It seems that this won''t catch FileUtils.chmod_R: FileUtils.should_receive(:chmod_R).with(0755, "#{@domain.directory}/*") I guess that is because it is passed in the block