Sha256: b830a155bd9d7db63fff878aeb1f73fd9aecd5c007c62d87501901aac414aa73

Contents?: true

Size: 305 Bytes

Versions: 2

Compression:

Stored size: 305 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Rubocop::Cop::Rails::ReadAttribute do
  subject(:cop) { described_class.new }

  it 'registers an offense for read_attribute' do
    inspect_source(cop,
                   ['res = read_attribute(:test)'])
    expect(cop.offenses.size).to eq(1)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.19.1 spec/rubocop/cop/rails/read_attribute_spec.rb
rubocop-0.19.0 spec/rubocop/cop/rails/read_attribute_spec.rb