SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newb Error Unit Test Problem: No Rakefile Found (prob easy fix?)

    I am on pg 171-2 of lenz's book.
    I deployed my rake command and it can't find the command (i think).
    Any suggestions troubleshooting this?

    Error Below (i called rake in my application root):
    Freeze:webapp jgraz$ rake test:units
    rake aborted!
    No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2143:in `raw_load_rakefile'
    (See full trace by running task with --trace)
    Here is my story_test.rb
    require File.dirname(__FILE__) + '/../test_helper'

    class StoryTest < Test::Unit::TestCase
    fixtures :stories

    def test_should_require_name
    s = Story.createname => nil)
    assert s.errors.onname)
    end

    def test_should_require_link
    s = Story.createlink => nil)
    assert s.errors.onlink)
    end

    def test_should_create_story
    s = Story.create(
    :name => 'My test submission',
    :link => 'http://www.testsubmission.com/')
    assert s.valid?
    end
    end
    Thanks,
    G

  2. #2
    SitePoint Member
    Join Date
    May 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I figured out that my ~/.profile was somehow deleted and missing. After reconfiguring it my test ran successfully. Any idea why my .profile was missing and that i had to reconfigure it?

  3. #3
    SitePoint Member
    Join Date
    May 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up 新加的空白文章1

    Is real? Ha


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •