Sha256: e83b34e76be5d7fd2661b03ceaaad85e38f3345c39a1b9b27ae48428cc9b032b
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
require 'spec_helper' require 'haravan_theme' require 'haravan_theme/releases' module HaravanTheme describe 'Releases' do before do VCR.use_cassette("timber_releases") do @releases = Releases.new @releases.fetch! end end it "should provide a list of all the available releases" do versions = @releases.all.keys assert_equal true, versions.include?('latest') assert_equal true, versions.include?('v2.0.2') assert_equal true, versions.include?('v2.0.1') end it "should be able to find a specific release" do release = @releases.find('v2.0.2') assert_equal 'v2.0.2', release.version end it "should raise an error if the version does not exist" do assert_raises Releases::VersionError do @releases.find('reccomended') end end it "should provide a zip URL for a release" do assert_equal "https://github.com/Haravan/Timber/archive/v2.0.2.zip", @releases.all['v2.0.2'].zip_url end it "should provide a zip URL for the latest release" do assert_equal "https://github.com/Haravan/Timber/archive/v2.0.2.zip", @releases.all['latest'].zip_url end it 'should provide a zip URL for the master release' do assert_equal "https://github.com/Haravan/Timber/archive/master.zip", @releases.all['master'].zip_url end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
haravan_theme-0.0.26 | spec/unit/releases_spec.rb |
haravan_theme-0.0.25 | spec/unit/releases_spec.rb |