Skip to content

Commit

Permalink
Rename csv builder specs for better understanding
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusg committed Dec 7, 2013
1 parent ebb0215 commit 45671c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/unit/csv_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
describe '.default_for_resource using Post' do
let(:csv_builder) { ActiveAdmin::CSVBuilder.default_for_resource(Post) }

it "should return a default csv_builder for Post" do
it 'returns a default csv_builder for Post' do
expect(csv_builder).to be_a(ActiveAdmin::CSVBuilder)
end

specify "the first column should be Id" do
it 'defines Id as the first column' do
expect(csv_builder.columns.first.name).to eq 'Id'
expect(csv_builder.columns.first.data).to eq :id
end

specify "the following columns should be content_column" do
it "has Post's content_columns" do
csv_builder.columns[1..-1].each_with_index do |column, index|
expect(column.name).to eq Post.content_columns[index].name.humanize
expect(column.data).to eq Post.content_columns[index].name.to_sym
Expand Down

0 comments on commit 45671c2

Please sign in to comment.