Displaying 20 results from an estimated 300 matches similar to: "array_including()"
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 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,
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
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
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/.
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 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 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 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 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
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?
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 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 16
10
autospec is not picking latest changes
Hey Guys.
I just updated a project form 1.1.4 that was working with autotest
3.10 without issues:
1) Updated spec/model/project_spec.rb and it fired only that spec.
2) Updated app/model/project.rb and it fired only the matching spec file.
After the update of rspec and rspec-rails as plugins a few minutes
ago, it only run the controller specs and no other. Also, it doesn''t
matter which
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
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 Aug 26
9
stub_model() and ActiveRecord Associations
Hi all,
I have what I thought was quite a simple requirement but something to
do with the way ActiveRecord''s associations work is making it quite
puzzling.
I guess I can sum it up with this failing test:
before(:each) do
@source_comment = @source.comments.create(:user_id => 1)
@target_comment = @target.comments.create(:user_id => 1)
end