Skip to content

Instantly share code, notes, and snippets.

View bilus's full-sized avatar

Marcin Bilski bilus

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bilus
bilus / bug.geojson
Last active February 10, 2018 08:55
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am bilus on github.
  • I am bilus (https://keybase.io/bilus) on keybase.
  • I have a public key ASDdsLQ7AtFZRMqy4D6MhoQaStc2-KQLpCtsNyOblYrfOAo

To claim this, I am signing this object:

Package
#company_owned?
when owned by User
should be truthy (FAILED - 1)
when owned by Company
should be falsey
Package
#cost
when owned by company
long range
behaves like expensive package
should be >= 500 (FAILED - 1)
should be < 1000 (FAILED - 2)
mid range
behaves like expensive package
should be >= 500 (FAILED - 3)
class User; end
class Company; end
class Package
def initialize(owner:)
end
def cost(distance)
end
end
RSpec.shared_examples 'cheap package' do
RSpec.describe Package do
let(:package) { described_class.new(owner: owner) }
describe '#company_owned?' do
subject { package.company_owned? }
context 'when owned by User' do
let(:owner) { User.new }
it { is_expected.to be_truthy }
module Sequel
module OpenStructValues
# Set overrides/defaults for inserting Openstruct
def insert_sql(*values)
p "Should get called"
end
end
Dataset.register_extension(:open_struct_values, OpenStructValues)
end