Sha256: 05b7571b74a5fa7152c6ee862ae2f9bf261c96cd2fd539602c71ef62efecbdad

Contents?: true

Size: 1.37 KB

Versions: 20

Compression:

Stored size: 1.37 KB

Contents

require 'spec_helper'
require 'chunky_png'

describe HighFive::Thor::Tasks::Ios do
  include HighFive::TestHelper
  include HighFive::IosHelper

  before(:all) do
    create_dummy_app!
    HighFive::Config.configure do |config|
      config.root = @project_root

      config.destination = "www"
      config.platform :ios do |ios|
        ios.destination = 'ios/www'
      end
    end
  end

  after(:all) do
    destroy_dummy_app!
  end

  context "Set version" do
    it 'updates version number' do
      cli(HighFive::Thor::Tasks::Ios, version: '2.0').set_version
      plist = File.read(File.join(@project_root, 'ios', 'Info.plist'))
      expect(plist).to match(/<key>CFBundleShortVersionString<\/key>\s+<string>2.0<\/string>/)
    end
  end

  context "set_property" do
    it 'updates changes a property' do
      cli(HighFive::Thor::Tasks::Ios, key: 'Api Endpoint', value: 'https://api.different.com').set_property
      plist = File.read(File.join(@project_root, 'ios', 'Info.plist'))
      expect(plist).to match(/<key>Api Endpoint<\/key>\s+<string>https:\/\/api.different.com<\/string>/)
    end

    it 'adds a new property' do
            cli(HighFive::Thor::Tasks::Ios, key: 'New Property', value: 'test').set_property
      plist = File.read(File.join(@project_root, 'ios', 'Info.plist'))
      expect(plist).to match(/<key>New Property<\/key>\s+<string>test<\/string>/)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
high_five-0.3.23 spec/ios_tasks_spec.rb
high_five-0.3.22 spec/ios_tasks_spec.rb
high_five-0.3.21 spec/ios_tasks_spec.rb
high_five-0.3.20 spec/ios_tasks_spec.rb
high_five-0.3.19 spec/ios_tasks_spec.rb
high_five-0.3.18 spec/ios_tasks_spec.rb
high_five-0.3.17 spec/ios_tasks_spec.rb
high_five-0.3.16 spec/ios_tasks_spec.rb
high_five-0.3.15 spec/ios_tasks_spec.rb
high_five-0.3.14 spec/ios_tasks_spec.rb
high_five-0.3.13 spec/ios_tasks_spec.rb
high_five-0.3.12 spec/ios_tasks_spec.rb
high_five-0.3.11 spec/ios_tasks_spec.rb
high_five-0.3.10 spec/ios_tasks_spec.rb
high_five-0.3.9 spec/ios_tasks_spec.rb
high_five-0.3.8 spec/ios_tasks_spec.rb
high_five-0.3.7 spec/ios_tasks_spec.rb
high_five-0.3.6 spec/ios_tasks_spec.rb
high_five-0.3.5 spec/ios_tasks_spec.rb
high_five-0.3.4 spec/ios_tasks_spec.rb