Sha256: dcb39c789bd5b20dfba5f62ddd79355fef60102c49f3dbf241d403f4e98bf490

Contents?: true

Size: 308 Bytes

Versions: 2

Compression:

Stored size: 308 Bytes

Contents

Given /^there is a cost of (.+)$/ do |cost|
  @meh = BigDecimal.new(cost)
end

Given /^I apply a margin of (.+)%$/ do |margin|
  margin = margin.strip.to_f
  @margin = @meh.add_margin(margin)
end

Then /^I should have a value of (.+)$/ do |price|
  assert_equal(BigDecimal.new(price).to_s, @margin.to_s)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
corrency-0.3.1 features/step_definitions/adding_profit_margin_steps.rb
corrency-0.3.0 features/step_definitions/profit_margin_calculations_steps.rb