On Apr 18, 5:59 pm, David Chelimsky wrote:
> What do you think of within(n).seconds { ... }?
I'm not sure i understand it fully taking into account the examples
above. Let me try to write them below:
expect {
link.click
}.to change {div.text}.from("before").to("after").within(2).seconds
link
On Apr 19, 2011, at 3:00 AM, Jarmo Pertman wrote:
> On Apr 18, 5:59 pm, David Chelimsky wrote:
>> What do you think of within(n).seconds { ... }?
>
> I'm not sure i understand it fully taking into account the examples
> above. Let me try to write them below:
> expect {
>link.click
> }.to cha
Hey guys, I'm currently working on a project, that we use rspec. We
don't like cucumber too much, because it seems too "verbose", but we
like a lot the cucumber's table, that we can use to specify some
scenarios.
In order to use this feature, but withou using cucumber, or writing
another files, I'v
I'm new to ruby and just learning cucumber and rspec. I have some
examples(tests) that need to fake a directory structure and file
grouping, fake a properly formatted json file and fake a ruby-git
interraction (git.fetch, git.merge).
I've been reading about mocks and stubs but still feeling a litt
I'm running into this error while trying to run a unit test on a
Mongoid database:
def show
id=params[:id]
@user=User.find(:first,id)
end
My test
before(:each) do
@user = Fabricate(:user)
sign_in @user
end
...
it "should be successful" do
get "show", :id => @user
Hi,
On Wed, Apr 20, 2011 at 05:32, planon wrote:
> I'm running into this error while trying to run a unit test on a
> Mongoid database:
>
> def show
> id=params[:id]
> @user=User.find(:first,id)
> end
>
> My test
>
> before(:each) do
> @user = Fabricate(:user)
> sign_in @user
> en
Dear all,
Anyone know how to pass command-line parameter to Rspec script?
For example:
I want to run the test.rb script. Suppose there is a parameter that is
set in test.rb script is sleep. For the convenience,I want to set the
parameter for sleep in the command-line.
If type : $ spec test.rb --s
I want to test that the JSON response from a create action is
sanitized properly, but rspec or webrat appears to be parsing the
output into proper HTML chars instead of escaped characters. I have
verified that it escapes properly in the regular browser json
response.
The relevant RSpec test code
On Apr 18, 2011, at 10:58 PM, Zhong wrote:
> Dear all,
>
> Anyone know how to pass command-line parameter to Rspec script?
>
> For example:
> I want to run the test.rb script. Suppose there is a parameter that is
> set in test.rb script is sleep. For the convenience,I want to set the
> parameter