lawl, David has been out of the loop a few e-mails.I left in an extra line.
Thanks for the expansion Ben, adds much more clarity,
On Jan 29, 2008 8:03 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Jan 29, 2008 6:55 PM, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> > try it, does the same th
On Jan 29, 2008 6:55 PM, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> try it, does the same thing ='(
Shouldn't be the exact same thing. What's the whole error?
Also - what version of rspec? If trunk, do you have the latest (3268)?
>
>
>
> On Jan 29, 2008 7:49 PM, Shane Mingins <[EMAIL PROTECTED
Sematics.. the method is never returning an error, it raises one. So
you can't say @audience.stats="dsfds" and expect to see an exception
returned right?
Since an exception is being raised you have to think of another way of
testing it aside from checking it's return value... So you could do
So if I understand correctly,
The following didn't raise an error:
@audience.stats = 'Market Goblin'
@audience.stats.should raise_error
because audience.stats didn't return an error.
Where as lambda will return an error.
On Jan 29, 2008 10:58 PM, Ben Mabey <[EMAIL PROTECTED]> wrote:
> Andrew W
Andrew WC Brown wrote:
> oh, I left in:
>
> it "should return an error when passed a string" do
> @audience.stats = 'Market Goblin'
> lambda [EMAIL PROTECTED] = 'Market Goblin'}.should raise_error
> end
>
> when yours is:
>
> it "should return an error when passed a string" do
>
oh, I left in:
it "should return an error when passed a string" do
@audience.stats = 'Market Goblin'
lambda [EMAIL PROTECTED] = 'Market Goblin'}.should raise_error
end
when yours is:
it "should return an error when passed a string" do
lambda [EMAIL PROTECTED] = 'Market Gobli
H
I just ran this and 2 examples, 0 failures
class Audience
attr_accessor :stats
def initialize(name = nil,value = nil)
@name ||= 'all'
@value ||= value
end
def stats=(flux)
@stats = @value * flux / 0.025
end
def market_share
"The Market share is for [EMAIL PR
try it, does the same thing ='(
On Jan 29, 2008 7:49 PM, Shane Mingins <[EMAIL PROTECTED]> wrote:
> Are you looking for something like this
> lambda { @audience.stats = 'Market Goblin' }.should raise_error
>
>
> On 30/01/2008, at 1:48 PM, Andrew WC Brown wrote:
>
> Trying to spec the following bu
Are you looking for something like this
lambda { @audience.stats = 'Market Goblin' }.should raise_error
On 30/01/2008, at 1:48 PM, Andrew WC Brown wrote:
Trying to spec the following but don't know if I'm using the right
matcher.
How do I spec? Plz, sugar on tops.
Audience.stats
- should h