diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/day_entry_test.rb | 4 | ||||
| -rw-r--r-- | test/timesheet_resource_test.rb | 16 | 
2 files changed, 10 insertions, 10 deletions
| diff --git a/test/day_entry_test.rb b/test/day_entry_test.rb index ec2abe2..3e8be24 100644 --- a/test/day_entry_test.rb +++ b/test/day_entry_test.rb @@ -21,14 +21,14 @@ class DayEntryTest < HCl::TestCase    def test_append_note      entry = HCl::DayEntry.new(:id => '1', :notes => 'yourmom.', :hours => '1.0') -    HCl::DayEntry.stubs(:post) +    HCl::Net.stubs(:post)      entry.append_note('hi world')      assert_equal "yourmom.\nhi world", entry.notes    end    def test_append_note_to_empty      entry = HCl::DayEntry.new(:id => '1', :notes => nil, :hours => '1.0') -    HCl::DayEntry.stubs(:post) +    HCl::Net.stubs(:post)      entry.append_note('hi world')      assert_equal 'hi world', entry.notes    end diff --git a/test/timesheet_resource_test.rb b/test/timesheet_resource_test.rb index 1f1b1de..7397c0e 100644 --- a/test/timesheet_resource_test.rb +++ b/test/timesheet_resource_test.rb @@ -4,7 +4,7 @@ class TimesheetResourceTest < HCl::TestCase    def setup      FakeWeb.allow_net_connect = false -    HCl::TimesheetResource.configure \ +    HCl::Net.configure \        'login' => 'bob',        'password' => 'secret',        'subdomain' => 'bobclock', @@ -12,30 +12,30 @@ class TimesheetResourceTest < HCl::TestCase    end    def test_configure -    assert_equal 'bob', HCl::TimesheetResource.login -    assert_equal 'secret', HCl::TimesheetResource.password -    assert_equal 'bobclock', HCl::TimesheetResource.subdomain -    assert_equal true, HCl::TimesheetResource.ssl +    assert_equal 'bob', HCl::Net.login +    assert_equal 'secret', HCl::Net.password +    assert_equal 'bobclock', HCl::Net.subdomain +    assert_equal true, HCl::Net.ssl    end    def test_http_get      FakeWeb.register_uri(:get, "https://bob:secret@bobclock.harvestapp.com/foo",                           :body => 'gotten!'.inspect) -    body = HCl::TimesheetResource.get 'foo' +    body = HCl::Net.get 'foo'      assert_equal 'gotten!', body    end    def test_http_post      FakeWeb.register_uri(:post, "https://bob:secret@bobclock.harvestapp.com/foo",                           :body => 'posted!'.inspect) -    body = HCl::TimesheetResource.post 'foo', {pizza:'taco'} +    body = HCl::Net.post 'foo', {pizza:'taco'}      assert_equal 'posted!', body    end    def test_http_delete      FakeWeb.register_uri(:delete, "https://bob:secret@bobclock.harvestapp.com/foo",                           :body => 'wiped!'.inspect) -    body = HCl::TimesheetResource.delete 'foo' +    body = HCl::Net.delete 'foo'      assert_equal 'wiped!', body    end  end | 
