diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-01-25 12:47:58 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-01-25 12:47:58 +0300 |
commit | b368447cf7fbd090704e22311dde72cd293d9779 (patch) | |
tree | 4e34665813874679da769d402690425baec178d6 /spec | |
parent | ac92554dfc25fc8129b1972da9a385af8d8b733f (diff) |
Remove unneeded code and fix offenses
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/prependable_spec.rb | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/spec/lib/prependable_spec.rb b/spec/lib/prependable_spec.rb deleted file mode 100644 index 7a338624e9e..00000000000 --- a/spec/lib/prependable_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'spec_helper' - -describe Prependable do - subject { FooObject } - - context 'class methods' do - it "has a method" do - expect(subject).to respond_to(:class_value) - end - - it 'can execute a method' do - expect(subject.class_value).to eq(20) - end - end - - context 'instance methods' do - it "has a method" do - expect(subject.new).to respond_to(:value) - end - - it 'chains a method execution' do - expect(subject.new.value).to eq(100) - end - end - - module Foo - extend Prependable - - prepended do - def self.class_value - 20 - end - end - - def value - super * 10 - end - end - - class FooObject - prepend Foo - - def value - 10 - end - end -end |