test/octopi_test.rb
# TODO: Those tests are obviously brittle. Need to stub/mock it.
Those tests are obviously brittle. Need to stub/mock it.
Those tests are obviously brittle . Need to stub / mock it .
def assert_find_all(cls, check_method, repo, user)
    repo_method = cls.resource_name(:plural)
    item1 = cls.find_all(user.login, repo.name).first
    item2 = cls.find_all(repo).first
    item3 = repo.send(repo_method).first
    assert_equal item1.send(check_method), item2.send(check_method)
    assert_equal item1.send(check_method), item3.send(check_method)
  end
def assert_find_all ( cls , check_method , repo , user ) repo_method = cls . resource_name ( :plural ) item1 = cls . find_all ( user . login , repo . name ) . first item2 = cls . find_all ( repo ) . first item3 = repo . send ( repo_method ) . first assert_equal item1 . send ( check_method ) , item2 . send ( check_method ) assert_equal item1 . send ( check_method ) , item3 . send ( check_method ) end
TODO: Those tests are obviously brittle.
TODO : Those tests are obviously brittle .
cls
<not_specific>
check_method
<not_specific>
repo
<not_specific>
user
<not_specific>