Skip to content

Commit

Permalink
Merge pull request #584 from Insti/Openstruct_extending_issues
Browse files Browse the repository at this point in the history
Revert "Simplify test for MetadataFiles#canonical_data"
  • Loading branch information
hilary authored Apr 30, 2017
2 parents db45c0c + 8533115 commit 6e634ef
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/generator/files/metadata_files_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ class MetadataFilesTest < Minitest::Test
track: 'test/fixtures/xruby'
)

class TestMetadataFiles
def initialize
@paths = FixturePaths
@exercise_name = 'alpha'
end
attr_reader :paths, :exercise_name
include MetadataFiles
end

def test_canonical_data
subject = OpenStruct.new(paths: FixturePaths, exercise_name: 'unimportant')
subject.extend(MetadataFiles)
subject = TestMetadataFiles.new
assert_instance_of CanonicalDataFile, subject.canonical_data
end
end
Expand Down

0 comments on commit 6e634ef

Please sign in to comment.