Skip to content

Commit

Permalink
Fix RuboCop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
barthez committed Dec 14, 2016
1 parent 11537e4 commit 0f68018
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/active_data/model/attributes/reflections/base.rb
Expand Up @@ -12,8 +12,7 @@ def build(_target, _generated_methods, name, *args, &block)
new(name, options)
end

def generate_methods(name, target)
end
def generate_methods(name, target) end

def attribute_class
@attribute_class ||= "ActiveData::Model::Attributes::#{name.demodulize}".constantize
Expand Down
5 changes: 4 additions & 1 deletion spec/lib/active_data/active_record/associations_spec.rb
Expand Up @@ -203,6 +203,9 @@ def read_attribute(name)
specify { expect(User.reflect_on_association(:profile).klass).to be < Profile }
specify { expect(User.new.profile).to be_nil }
specify { expect(User.new.tap { |u| u.create_profile(first_name: 'Profile') }.profile).to be_a(User::Profile) }
specify { expect(User.new.tap { |u| u.create_profile(first_name: 'Profile') }.read_attribute(:profile)).to eq({ first_name: 'Profile', last_name: nil, admin: nil, age: nil }.to_json) }
specify do
expect(User.new.tap { |u| u.create_profile(first_name: 'Profile') }.read_attribute(:profile))
.to eq({ first_name: 'Profile', last_name: nil, admin: nil, age: nil }.to_json)
end
end
end
3 changes: 1 addition & 2 deletions spec/lib/active_data/model/scopes_spec.rb
Expand Up @@ -19,8 +19,7 @@ def no_mars

private

def hidden_method
end
def hidden_method() end
end
end
end
Expand Down

0 comments on commit 0f68018

Please sign in to comment.