Skip to content

Commit

Permalink
add test for table
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed May 17, 2017
1 parent 6913793 commit 24ac69c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/cwm/test/Makefile.am
@@ -1,6 +1,7 @@
TESTS = \
abstract_widget_test.rb \
custom_widget_test.rb \
table_test.rb \
widgets_test.rb

TEST_EXTENSIONS = .rb
Expand Down
24 changes: 24 additions & 0 deletions library/cwm/test/table_test.rb
@@ -0,0 +1,24 @@
#! /usr/bin/env rspec --format doc

require_relative "test_helper"

require "cwm/rspec"
require "cwm/table"

describe CWM::Table do
class MyTable < CWM::Table
def header
["English", "Deutsch"]
end

def items
[
[:one, "one", "eins"],
[:two, "two", "zwei"]
]
end
end
subject { MyTable.new }

include_examples "CWM::CustomWidget"
end

0 comments on commit 24ac69c

Please sign in to comment.