Sha256: 753c3fe0f83d8db3b2e10733b599d8787be5e49d34680c6f896c82a4dde82783

Contents?: true

Size: 1.4 KB

Versions: 10

Compression:

Stored size: 1.4 KB

Contents

Given /is configured for custom Applications icon$/ do
  appicon = File.expand_path(File.dirname(__FILE__) + "/../fixtures/custom_assets/appicon.icns")
  in_project_folder do
    append_to_file "Rakefile", <<-RUBY.gsub(/^    /, '')
    $choctop.applications_icon = "appicon.icns"
    RUBY
    FileUtils.cp(appicon, "appicon.icns")
  end
end

Given /^is configured for an asset file "([^\"]*)" to be included in dmg$/ do |file|
  choctop_add_file(file)
end

When /^dmg "(.*)" is mounted as "(.*)"$/ do |dmg, name|
  @stdout = File.expand_path(File.join(@tmp_root, "hdiutil.out"))
  in_project_folder do
    @mountpoint = ChocTop.new.mountpoint
    FileUtils.mkdir_p @mountpoint
    @volume_path = "#{@mountpoint}/#{name}"
    `hdiutil attach '#{dmg}' -mountpoint '#{@volume_path}' -noautoopen > #{@stdout}`
  end
end

def in_mounted_volume(&block)
  FileUtils.chdir(@volume_path, &block)
end

Then %r{^folder "(.*)" in mounted volume (is|is not) created} do |folder, is|
  in_mounted_volume do
    File.exists?(folder).should(is == 'is' ? be_true : be_false)
  end
end

Then %r{^file "(.*)" in mounted volume (is|is not) created} do |file, is|
  in_mounted_volume do
    File.exists?(file).should(is == 'is' ? be_true : be_false)
  end
end

Then /^file "(.*)" in mounted volume (is|is not) invisible$/ do |file, is|
  in_mounted_volume do
    `GetFileInfo -aV '#{@volume_path}/#{file}'`.to_i.should_not == (is == 'is' ? 0 : 1)
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
billymeltdown-choctop-0.11.0.8 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.7 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.6 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.5 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.4 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.3 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.2 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0.1 features/step_definitions/dmg_steps.rb
billymeltdown-choctop-0.11.0 features/step_definitions/dmg_steps.rb
choctop-0.11.0 features/step_definitions/dmg_steps.rb