On Tuesday, July 22, 2014 1:08:08 AM UTC+2, Sjouke Fikse wrote:
>
> I'm trying to create an instance of a class in a spec file, but I'm
> failing to do this.
>
> These two files exists:
>
> app/models/street.rb
>
> spec/models/street_spec.rb
>
> Within street_spec.rb, I'm trying to create a n
You should remove the line 'require "street"'.
On 22 July 2014 17:05, Sjouke Fikse wrote:
> Hi Javix, I did run rails generate rspec:install. I forgot to mention that.
>
> Here's the output of the files I mentioned:
>
> $ cat spec/models/street_spec.rb
>
> require "spec_helper"
> require "stree
Hi Javix, I did run rails generate rspec:install. I forgot to mention that.
Here's the output of the files I mentioned:
$ cat spec/models/street_spec.rb
require "spec_helper"
require "street"
describe "a street" do
it "can be created" do
Street.new
end
end
$ cat app/models/street.rb
On Tuesday, July 22, 2014 1:08:08 AM UTC+2, Sjouke Fikse wrote:
>
> I'm trying to create an instance of a class in a spec file, but I'm
> failing to do this.
>
> These two files exists:
>
> app/models/street.rb
>
> spec/models/street_spec.rb
>
> Within street_spec.rb, I'm trying to create a n
4 matches
Mail list logo