Wow! I guess this thread beated the record for simultaneous answers! :D
Best regards!
Rodrigo.
Em 27-04-2011 16:55, Sergio Ruiz escreveu:
i am setting up a few objects that are interrelated for use in an rspec
test..
something like:
describe Dimension do
before(:each) do
text = "string he
On Apr 26, 2011, at 8:54 AM, juwalter wrote:
> This
> https://github.com/rspec/rspec-rails/commit/59793dcc349b64f4ebcf742606371001256c774d
> is exciting news!! ("this adds capybara matchers to view and helper
> specs")
>
> Now, if I just knew how to take advantage of it? Do I have to require
> s
Hi,
On 27 Apr 2011, at 20:55, Sergio Ruiz wrote:
> i am setting up a few objects that are interrelated for use in an rspec
> test..
>
> something like:
>
> describe Dimension do
>
> before(:each) do
> text = "string here"
This defines a local variable 'text' which lives for the duration of th
On Apr 25, 9:19 am, Alisson Sales wrote:
> I've found the problem. The gem meta_where
> (https://github.com/ernie/meta_where) is doing something wrong in ruby
> 1.9.2, just removing it from my Gemfile and my suite is running fast
> again(6 seconds).
>
> Thank you guys, I'll open a issue on the met
Sergio,
I believe you need to make text an instance variable:
@text = "string here"
Or you could use a let block:
let(:text) do
"string "here"
end
Then you could continue to reference the text variable as you do now.
Jon Homan
On Wed, Apr 27, 2011 at 2:55 PM, Sergio Ruiz
On Wed, Apr 27, 2011 at 2:55 PM, Sergio Ruiz wrote:
> i am setting up a few objects that are interrelated for use in an rspec
> test..
>
> something like:
>
> describe Dimension do
>
> before(:each) do
> text = "string here"
> end
>
> it "should puts string" do
> puts text
> end
>
> end
>
> whe
On Apr 27, 2011, at 3:55 PM, Sergio Ruiz wrote:
> i am setting up a few objects that are interrelated for use in an rspec
> test..
>
> something like:
>
> describe Dimension do
>
> before(:each) do
> text = "string here"
> end
>
> it "should puts string" do
> puts text
> end
>
> end
>
> when
On 28/04/11 1:25 AM, Sergio Ruiz wrote:
i am setting up a few objects that are interrelated for use in an rspec
test..
something like:
describe Dimension do
before(:each) do
text = "string here"
end
it "should puts string" do
puts text
end
end
when i run this, i get an error: undefined
Your variable "text" doesn't exist outside the before(:each) loop. Replacing
text with @text should fix your problem.
-- Bouke
2011/4/27 Sergio Ruiz
> i am setting up a few objects that are interrelated for use in an rspec
> test..
>
> something like:
>
> describe Dimension do
>
> before(:each)
This
https://github.com/rspec/rspec-rails/commit/59793dcc349b64f4ebcf742606371001256c774d
is exciting news!! ("this adds capybara matchers to view and helper
specs")
Now, if I just knew how to take advantage of it? Do I have to require
something else in spec_helper? I have already added included
i am setting up a few objects that are interrelated for use in an rspec
test..
something like:
describe Dimension do
before(:each) do
text = "string here"
end
it "should puts string" do
puts text
end
end
when i run this, i get an error: undefined local variable or method
`text'
am doing so
On Apr 27, 2011, at 6:40 AM, David Chelimsky wrote:
>
> On Apr 26, 2011, at 5:39 PM, Matthew Van Horn wrote:
>
>>
>> On Apr 26, 2011, at 4:02 PM, Rodrigo Rosenfeld Rosas wrote:
>>
>>> Ok, now I understand what is your issue.
>>>
>> class Foo
>> end
>>
>> class Bar
>> d
On Apr 26, 2011, at 5:39 PM, Matthew Van Horn wrote:
>
> On Apr 26, 2011, at 4:02 PM, Rodrigo Rosenfeld Rosas wrote:
>
>> Ok, now I understand what is your issue.
>>
> class Foo
> end
>
> class Bar
> def self.my_foo
> @my_foo ||= Foo.new
> end
> def s
13 matches
Mail list logo