Skip to content

Commit

Permalink
Merge pull request pherkin#106 from ehuelsmann/fix-100
Browse files Browse the repository at this point in the history
Remove unused $tag_scheme parameter in loader path
  • Loading branch information
ehuelsmann committed Sep 6, 2016
2 parents 6191b49 + 67dc59f commit 65148ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/App/pherkin.pm
Expand Up @@ -68,7 +68,7 @@ sub run {
$features_path ||= './features/';

my ( $executor, @features ) =
Test::BDD::Cucumber::Loader->load( $features_path, $self->tag_scheme );
Test::BDD::Cucumber::Loader->load( $features_path );
die "No feature files found in $features_path" unless @features;

$executor->add_extensions($_) for @{ $self->extensions };
Expand Down
4 changes: 2 additions & 2 deletions lib/Test/BDD/Cucumber/Loader.pm
Expand Up @@ -35,7 +35,7 @@ use Test::BDD::Cucumber::Parser;
use Test::BDD::Cucumber::StepFile();

sub load {
my ( $class, $path, $tag_scheme ) = @_;
my ( $class, $path ) = @_;

my $executor = Test::BDD::Cucumber::Executor->new();

Expand All @@ -55,7 +55,7 @@ sub load {
my @features = map {
my $file = file($_);
my $feature =
Test::BDD::Cucumber::Parser->parse_file( $file, $tag_scheme );
Test::BDD::Cucumber::Parser->parse_file( $file );
} (
$file
? ( $file . '' )
Expand Down
12 changes: 5 additions & 7 deletions lib/Test/BDD/Cucumber/Parser.pm
Expand Up @@ -42,34 +42,32 @@ use Test::BDD::Cucumber::Errors qw/parse_error_from_line/;
# https://github.com/cucumber/cucumber/wiki/Scenario-outlines

sub parse_string {
my ( $class, $string, $tag_scheme ) = @_;
my ( $class, $string ) = @_;

return $class->_construct(
Test::BDD::Cucumber::Model::Document->new(
{
content => $string
}
),
$tag_scheme
)
);
}

sub parse_file {
my ( $class, $string, $tag_scheme ) = @_;
my ( $class, $string ) = @_;
return $class->_construct(
Test::BDD::Cucumber::Model::Document->new(
{
content =>
scalar( read_file( $string, { binmode => ':utf8' } ) ),
filename => '' . $string
}
),
$tag_scheme
)
);
}

sub _construct {
my ( $class, $document, $tag_scheme ) = @_;
my ( $class, $document ) = @_;

my $feature =
Test::BDD::Cucumber::Model::Feature->new( { document => $document } );
Expand Down

0 comments on commit 65148ab

Please sign in to comment.