Displaying 20 results from an estimated 12000 matches similar to: "cucumber - mark a step as pending"
2009 Feb 05
3
[Cucumber, Webrat] Error backtraces shown as HTML in console
Since upgrading to Cucumber 0.1.99.19 I''ve noticed that the backtraces
appearing in the console output are of the form:
Page load was not successful (Code: 500):
Followed by the dump of the rails error page. That page looks fine in
a browser, and it''s helpful enough to see it when save_and_open_page
does its thing, but I''m pretty used to reading plain old
2009 Apr 27
2
[cucumber] Setting a constant in step definition
On Mon, Apr 27, 2009 at 7:00 AM, Andrew Premdas <apremdas at gmail.com> wrote:
> Currently I have a very simple constants implementation being loaded as a
> Rails initialiser
>
> module MVOR
> ? module Postage
> ??? THRESHOLD = BigDecimal.new(''6.99'')
> ??? RATE = BigDecimal.new(''30.00'')
> ? end
> end
>
>
> My scenarios
2009 Feb 06
6
RecordNotFound bubbling thru to cucumber
Hello,
I have a controller action that raises a RecordNotFound exception if
you''re not allowed to see something. In my global application
controller (application.rb), I catch these and render the 404
template. But when I run cucumber (using webrat), it''s getting the
full stacktrace (the step blows up). Any ideas why? I have
consider_all_requests_local turned off in my test.rb.
2008 Dec 02
11
Any plans for Before-feature or Before-all steps in Cucumber?
Hi
The code I''m working on now is a server daemon that talks to Twitter,
an RSS feed, and some web pages. I''ve got mock implementations of
Twitter and the web stuff, which I start and stop with
daemon_controller[1]. I do all the setup in a Before block, but this
makes the feature runs agonisingly slow due to the time waiting for
everything to restart. I''m
2008 Sep 26
6
BDD / cucumber thought - chaining ''Then'' steps with Which
Going back to the debate about keeping state between steps, I found
myself with the mild urge to be able to write this today:
Given there is a user
And the user has 20 friends
Then I should see a thumbnail of each of the users''s friends
Which should be a link to the user profile page for that friend
NB: An idiom in this which may be songkick-only but was inspired by
what
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
2011 Sep 13
12
Assertions for asynchronous behaviour
Hi all,
In GOOS[1] they use an assertion called assertEventually which samples the system for a success state until a certain timeout has elapsed. This allows you to synchronise the tests with asynchronous code.
Do we have an equivalent of that in the Ruby / RSpec world already? I know capybara has wait_until { } but that''s fairly rudimentary - the failure message isn''t very
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
2008 Sep 13
3
RCov / RSpec segfaults on Ubuntu
Hi all,
I appreciate that this is not an RSpec question, but I wondered if
anyone out there can offer some pointers. We''re using the latest
versions of RSpec and RCov, and ruby --version says this (on the
Ubuntu build server):
ruby 1.8.6 (2008-07-17 patchlevel 279) [x86_64-linux]
We''re getting intermittent (yes, intermittent!) segfaults from the
build when running
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 =>
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
2009 Apr 16
6
Cucumber - step negating another expecting step
On 16 Apr 2009, at 11:22, Joaquin Rivera Padron wrote:
> at the moment I do it this way, hiding the complexity out of the
> steps:
>
> Then /^I should see the people search form$/ do
> people_search_form_exists
> end
>
> Then /^I should not see the people search form$/ do
> people_search_form_exists "not"
> end
>
> and then the method:
>
>
2009 Jan 28
2
[Cucumber, TextMate Bundle] Call for help
Hey all,
As some of you may know I created the Cucumber TextMate bundle:
http://github.com/bmabey/cucumber-tmbundle/tree/master
What most of you probably don''t know is that I stopped using TextMate
(in favor of Vim) several months ago. Since then the Cucumber bundle
has been somewhat neglected by me and I''ve mostly pulled in patches and
regenerated the syntax for new
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
2008 Aug 15
7
Autotest and subclasses / namespaces
I am writing a controller admin/cities_controller.rb
it inherits from AdminController, so it''s defined like
class Admin::CitiesController > AdminController
Whenever I save the controller file, autotest freaks out:
uninitialized constant Admin::AdminController (NameError)
I''m pretty used to just hitting CTRL-C to get autotest to re-load all
the files, or flicking to
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 Aug 27
3
array_including()
I found myself having to write this today:
class ArrayMatcher
def initialize(array_to_match)
@array_to_match = array_to_match
end
def ==(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
2008 Aug 20
9
I want RSpec for CSS layout.
I don''t even know how it''d be possible (through Selenium?), but I want it.
I want to see if my stupid CSS hacks break. I want to say:
describe "#nav-column" do
body = something("#body-column")
it "should line up at the top" do
dom[:top].should_be == body.dom[:top]
end
it "should always be to the right" do
2009 Apr 02
8
Problem with Custom matcher and Blocks
Hi,
I''m trying to write my first custom matcher.
Here''s a bit of my example group.
describe "/contact/index" do
include FormMatchers
before(:each) do
render ''contact/index''
end
it "should show the contact form" do
response.should have_a_contact_form
end
describe "the contact form" do
context
2009 Feb 17
5
[Cucumber] Level of features / Feature dependent steps
Forgive the long post, just looking for input/advice/alternate
opinions..
Like many I think that going through the exercise of framing user
requests in Cucumber terms(Features, Scenarios..) really helps
facilitate necessary conversations and avoid time wasted implementing
the wrong thing(e.g. as a requirement/specification tool). However,
I''m a bit confused when it comes to