mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
22d77a2ced
You can run generator spec by doing: GENERATOR_SPEC=true rake spec:ative_record_41 We are doing this because we don't want to make API calls in the spec. At the same time, we aldo don't want to use fakeweb or something like that because it causes "you never realize until you go production" situation. We had it before and shipped a bug - we are not sure what is a better solution, but at long as I'm aware of this I'll take care of it.
18 lines
566 B
Ruby
18 lines
566 B
Ruby
require 'spec_helper'
|
|
|
|
if defined?(Rails)
|
|
require 'rails/generators'
|
|
require 'generators/kaminari/views_generator'
|
|
|
|
describe Kaminari::Generators::GitHubApiHelper, :generator_spec => true do
|
|
describe '.get_files_in_master' do
|
|
subject { Kaminari::Generators::GitHubApiHelper.get_files_in_master }
|
|
it { should include(["README", "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"]) }
|
|
end
|
|
|
|
describe '.get_content_for' do
|
|
subject { Kaminari::Generators::GitHubApiHelper.get_content_for("README") }
|
|
it { should == "" }
|
|
end
|
|
end
|
|
end
|